1# REQUIRES: x86 2## Test we resolve symbolic relocations in .debug_* sections to a tombstone 3## value if the referenced symbol is discarded (--gc-sections, non-prevailing 4## section group, SHF_EXCLUDE, /DISCARD/, etc). 5 6# RUN: llvm-mc -filetype=obj -triple=i386 %s -o %t.o 7# RUN: ld.lld %t.o -o %t 8# RUN: llvm-objdump -s %t | FileCheck %s 9 10# CHECK: Contents of section .debug_loc: 11# CHECK-NEXT: 0000 01000000 12# CHECK-NEXT: Contents of section .debug_ranges: 13# CHECK-NEXT: 0000 01000000 14# CHECK-NEXT: Contents of section .debug_addr: 15# CHECK-NEXT: 0000 00000000 16 17.section .text.1,"axe" 18 .byte 0 19 20## Resolved to UINT32_C(-2), with the addend ignored. 21## UINT32_C(-1) is a reserved value (base address selection entry) which can't be used. 22.section .debug_loc 23 .long .text.1+8 24.section .debug_ranges 25 .long .text.1+16 26 27## Resolved to UINT32_C(0), with the addend ignored. 28.section .debug_addr 29 .long .text.1+8 30