forked from OSchip/llvm-project
66 lines
2.0 KiB
Plaintext
66 lines
2.0 KiB
Plaintext
# Test that -X/--discard-locals works.
|
|
#
|
|
#RUN: yaml2obj -format=elf %s -o=%t.o
|
|
#RUN: lld -flavor old-gnu -target x86_64 %t.o -shared -X -o %t1
|
|
#RUN: llvm-objdump -t %t1 | FileCheck %s
|
|
|
|
#CHECK-NOT: 0000000000400121 l .rodata 00000000 .Lsym8
|
|
|
|
---
|
|
FileHeader:
|
|
Class: ELFCLASS64
|
|
Data: ELFDATA2LSB
|
|
OSABI: ELFOSABI_FREEBSD
|
|
Type: ET_REL
|
|
Machine: EM_X86_64
|
|
Sections:
|
|
- Name: .text
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
|
AddressAlign: 0x0000000000000004
|
|
Content: 00000000F20F100D00000000C3
|
|
- Name: .data
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_WRITE, SHF_ALLOC ]
|
|
AddressAlign: 0x0000000000000004
|
|
Content: ''
|
|
- Name: .bss
|
|
Type: SHT_NOBITS
|
|
Flags: [ SHF_WRITE, SHF_ALLOC ]
|
|
AddressAlign: 0x0000000000000004
|
|
- Name: .rodata.str1.1
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_ALLOC, SHF_MERGE, SHF_STRINGS ]
|
|
AddressAlign: 0x0000000000000001
|
|
Content: ''
|
|
- Name: .rela.text
|
|
Type: SHT_RELA
|
|
Link: .symtab
|
|
AddressAlign: 0x0000000000000008
|
|
Info: .text
|
|
Relocations:
|
|
- Offset: 0x0000000000000008
|
|
Symbol: .Lsym8
|
|
Type: R_X86_64_PC32
|
|
Addend: -4
|
|
Symbols:
|
|
Local:
|
|
- Name: .Lsym8
|
|
Section: .rodata.str1.1
|
|
- Name: test
|
|
Section: .text
|
|
Value: 0x000000000000000C
|
|
- Name: .text
|
|
Type: STT_SECTION
|
|
Section: .text
|
|
- Name: .data
|
|
Type: STT_SECTION
|
|
Section: .data
|
|
- Name: .bss
|
|
Type: STT_SECTION
|
|
Section: .bss
|
|
- Name: .rodata.str1.1
|
|
Type: STT_SECTION
|
|
Section: .rodata.str1.1
|
|
...
|