2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
4 # RUN: echo "SECTIONS { .text : { *(.text) } foo = .; .bar : { *(.bar) } }" > %t1.script
5 # RUN: ld.lld -o %t1 --script %t1.script %t.o -shared
6 # RUN: llvm-readobj --symbols -S --section-data %t1 | FileCheck %s
14 # The symbol foo is defined as a position in the file. This means that it is
15 # not absolute and it is possible to compute the distance from foo to some other
16 # position in the file. The symbol is not really in any output section, but
17 # ELF has no magic constant for not absolute, but not in any section.
18 # Fortunately the value of a symbol in a non relocatable file is a virtual
19 # address, so the section can be arbitrary.
24 # CHECK-NEXT: Type: SHT_PROGBITS
26 # CHECK-NEXT: SHF_ALLOC
27 # CHECK-NEXT: SHF_EXECINSTR
29 # CHECK-NEXT: Address: 0x0
34 # CHECK-NEXT: AddressAlignment:
35 # CHECK-NEXT: EntrySize:
36 # CHECK-NEXT: SectionData (
37 # CHECK-NEXT: 0000: 04000000 |
43 # CHECK-NEXT: Value: 0x4
45 # CHECK-NEXT: Binding: Local
46 # CHECK-NEXT: Type: None
48 # CHECK-NEXT: STV_HIDDEN
50 # CHECK-NEXT: Section: .text