2 ## Test we resolve symbolic relocations in .debug_* sections to a tombstone
3 ## value if the referenced section symbol is folded into another section by ICF.
4 ## Otherwise, we would leave entries in multiple CUs claiming ownership of the
5 ## same range of code, which can confuse consumers.
7 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
8 # RUN: ld.lld --icf=all %t.o -o %t
9 # RUN: llvm-objdump -s %t | FileCheck %s
11 # CHECK: Contents of section .debug_info:
12 # CHECK-NEXT: 0000 {{[0-9a-f]+}}000 00000000 00000000 00000000
13 # CHECK: Contents of section .debug_line:
14 # CHECK-NEXT: 0000 [[ADDR:[0-9a-f]+]] 00000000
15 # CHECK-SAME: [[ADDR]] 00000000
21 ## .text.1 will be folded by ICF.
29 ## .debug_line contributions associated with folded-in functions will describe
30 ## different lines to the canonical function. Leaving a tombstone value would
31 ## prevent users from setting breakpoints on the folded-in functions.
32 ## Instead resolve the relocation to the folded .text.1 to .text