brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 1aa4314 Raw
52 lines · plain
1# REQUIRES: x862## Test we resolve symbolic relocations in .debug_* sections to a tombstone3## value if the referenced symbol is discarded (--gc-sections, non-prevailing4## section group, SHF_EXCLUDE, /DISCARD/, etc).5 6# RUN: llvm-mc -filetype=obj -triple=i386 %s -o %t.o7# RUN: ld.lld %t.o -o %t8# RUN: llvm-objdump -s %t | FileCheck %s9 10# CHECK:      Contents of section .debug_loc:11# CHECK-NEXT:  0000 0100000012# CHECK-NEXT: Contents of section .debug_ranges:13# CHECK-NEXT:  0000 0100000014# CHECK-NEXT: Contents of section .debug_addr:15# CHECK-NEXT:  0000 0000000016# CHECK-NEXT: Contents of section .debug_names:17# CHECK-NEXT:  0000 ffffffff18 19## -z dead-reloc-in-nonalloc= can override the tombstone value.20# RUN: ld.lld -z dead-reloc-in-nonalloc=.debug_loc=42 -z dead-reloc-in-nonalloc=.debug_addr=0xfffffffffffffffe %t.o -o %t121# RUN: llvm-objdump -s %t1 | FileCheck %s --check-prefix=OVERRIDE22 23# OVERRIDE:      Contents of section .debug_loc:24# OVERRIDE-NEXT:  0000 2a000000                             *...25# OVERRIDE-NEXT: Contents of section .debug_ranges:26# OVERRIDE-NEXT:  0000 01000000                             ....27# OVERRIDE-NEXT: Contents of section .debug_addr:28# OVERRIDE-NEXT:  0000 feffffff                             ....29 30.section .text.1,"axe"31  .byte 032 33## Resolved to UINT32_C(-2), with the addend ignored.34## UINT32_C(-1) is a reserved value (base address selection entry) which can't be used.35.section .debug_loc36  .long .text.1+837.section .debug_ranges38  .long .text.1+1639 40## Resolved to UINT32_C(0), with the addend ignored.41.section .debug_addr42  .long .text.1+843 44.section  .debug_info,"eG",@progbits,5657452045627120676,comdat45.Ltu_begin0:46 47.section .debug_names48## .debug_names may reference a local type unit defined in a COMDAT .debug_info49## section (-g -gpubnames -fdebug-types-section). If the referenced section is50## non-prevailing, resolve to UINT32_MAX.51.long .Ltu_begin052