forked from OSchip/llvm-project
58 lines
1.7 KiB
Plaintext
58 lines
1.7 KiB
Plaintext
# Test that debug info is assigned typeNoAlloc and that the output sections have
|
|
# a virtual address of 0.
|
|
RUN: lld -flavor old-gnu -target x86_64 -e main --output-filetype=yaml \
|
|
RUN: %p/Inputs/debug0.x86-64 %p/Inputs/debug1.x86-64 -o %t
|
|
RUN: FileCheck %s -check-prefix YAML < %t
|
|
|
|
RUN: lld -flavor old-gnu -target x86_64 -e main %p/Inputs/debug0.x86-64 \
|
|
RUN: %p/Inputs/debug1.x86-64 -o %t1
|
|
RUN: llvm-readobj -sections %t1 | FileCheck %s -check-prefix ELF
|
|
# Verify that non SHF_ALLOC sections are relocated correctly.
|
|
RUN: llvm-objdump -s %t1 | FileCheck %s -check-prefix RELOC
|
|
|
|
YAML: type: no-alloc
|
|
|
|
ELF: Section {
|
|
ELF: Name: .debug_info
|
|
ELF: Type: SHT_PROGBITS (0x1)
|
|
ELF: Flags [ (0x0)
|
|
ELF: ]
|
|
ELF: Address: 0x0
|
|
ELF: }
|
|
ELF: Section {
|
|
ELF: Name: .debug_abbrev
|
|
ELF: Type: SHT_PROGBITS (0x1)
|
|
ELF: Flags [ (0x0)
|
|
ELF: ]
|
|
ELF: Address: 0x0
|
|
ELF: }
|
|
ELF: Section {
|
|
ELF: Name: .debug_aranges
|
|
ELF: Type: SHT_PROGBITS (0x1)
|
|
ELF: Flags [ (0x0)
|
|
ELF: ]
|
|
ELF: Address: 0x0
|
|
ELF: }
|
|
ELF: Section {
|
|
ELF: Name: .debug_line
|
|
ELF: Type: SHT_PROGBITS (0x1)
|
|
ELF: Flags [ (0x0)
|
|
ELF: ]
|
|
ELF: Address: 0x0
|
|
ELF: }
|
|
ELF: Section {
|
|
ELF: Name: .debug_str
|
|
ELF: Type: SHT_PROGBITS (0x1)
|
|
ELF: Flags [ (0x0)
|
|
ELF: ]
|
|
ELF: Address: 0x0
|
|
ELF: }
|
|
|
|
RELOC: Contents of section .debug_info:
|
|
RELOC: 0000 4e000000 04000000 00000801 3a000000 N...........:...
|
|
# ^^ Relocation: ._debug_str + 0x3a
|
|
RELOC: 0010 01780000 00000000 00dc0140 00000000 .x.........@....
|
|
# ^^ Relocation: .debug_str + 0x78
|
|
RELOC: 0020 00100000 00000000 00000000 00028100 ................
|
|
# ^^ Relocation: .debug_str + 0x81
|