File: debug-dead-reloc-32.s

package info (click to toggle)
llvm-toolchain-11 1%3A11.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 995,808 kB
  • sloc: cpp: 4,767,656; ansic: 760,916; asm: 477,436; python: 170,940; objc: 69,804; lisp: 29,914; sh: 23,855; f90: 18,173; pascal: 7,551; perl: 7,471; ml: 5,603; awk: 3,489; makefile: 2,573; xml: 915; cs: 573; fortran: 503; javascript: 452
file content (29 lines) | stat: -rw-r--r-- 918 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# REQUIRES: x86
## Test we resolve symbolic relocations in .debug_* sections to a tombstone
## value if the referenced symbol is discarded (--gc-sections, non-prevailing
## section group, SHF_EXCLUDE, /DISCARD/, etc).

# RUN: llvm-mc -filetype=obj -triple=i386 %s -o %t.o
# RUN: ld.lld %t.o -o %t
# RUN: llvm-objdump -s %t | FileCheck %s

# CHECK:      Contents of section .debug_loc:
# CHECK-NEXT:  0000 01000000
# CHECK-NEXT: Contents of section .debug_ranges:
# CHECK-NEXT:  0000 01000000
# CHECK-NEXT: Contents of section .debug_addr:
# CHECK-NEXT:  0000 00000000

.section .text.1,"axe"
  .byte 0

## Resolved to UINT32_C(-2), with the addend ignored.
## UINT32_C(-1) is a reserved value (base address selection entry) which can't be used.
.section .debug_loc
  .long .text.1+8
.section .debug_ranges
  .long .text.1+16

## Resolved to UINT32_C(0), with the addend ignored.
.section .debug_addr
  .long .text.1+8