forked from OSchip/llvm-project
167 lines
4.2 KiB
Plaintext
167 lines
4.2 KiB
Plaintext
# This tests the functionality that lld is able to read
|
|
# an input YAML from a previous link
|
|
|
|
RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/initfini.o \
|
|
RUN: --noinhibit-exec --output-filetype=yaml -o %t.objtxt
|
|
RUN: lld -flavor old-gnu -target x86_64-linux %t.objtxt \
|
|
RUN: --noinhibit-exec -o %t1
|
|
RUN: llvm-readobj -sections %t1 | FileCheck %s -check-prefix=SECTIONS
|
|
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 0
|
|
SECTIONS: Name: (0)
|
|
SECTIONS: Type: SHT_NULL (0x0)
|
|
SECTIONS: Flags [ (0x0)
|
|
SECTIONS: ]
|
|
SECTIONS: }
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 1
|
|
SECTIONS: Name: .interp
|
|
SECTIONS: Type: SHT_PROGBITS (0x1)
|
|
SECTIONS: Flags [ (0x2)
|
|
SECTIONS: SHF_ALLOC (0x2)
|
|
SECTIONS: ]
|
|
SECTIONS: }
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 2
|
|
SECTIONS: Name: .hash
|
|
SECTIONS: Type: SHT_HASH (0x5)
|
|
SECTIONS: Flags [ (0x2)
|
|
SECTIONS: SHF_ALLOC (0x2)
|
|
SECTIONS: ]
|
|
SECTIONS: }
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 3
|
|
SECTIONS: Name: .dynsym
|
|
SECTIONS: Type: SHT_DYNSYM (0xB)
|
|
SECTIONS: Flags [ (0x2)
|
|
SECTIONS: SHF_ALLOC (0x2)
|
|
SECTIONS: ]
|
|
SECTIONS: }
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 4
|
|
SECTIONS: Name: .dynstr
|
|
SECTIONS: Type: SHT_STRTAB (0x3)
|
|
SECTIONS: Flags [ (0x2)
|
|
SECTIONS: SHF_ALLOC (0x2)
|
|
SECTIONS: ]
|
|
SECTIONS: }
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 5
|
|
SECTIONS: Name: .text
|
|
SECTIONS: Type: SHT_PROGBITS (0x1)
|
|
SECTIONS: Flags [ (0x6)
|
|
SECTIONS: SHF_ALLOC (0x2)
|
|
SECTIONS: SHF_EXECINSTR (0x4)
|
|
SECTIONS: ]
|
|
SECTIONS: }
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 6
|
|
SECTIONS: Name: .rodata
|
|
SECTIONS: Type: SHT_PROGBITS (0x1)
|
|
SECTIONS: Flags [ (0x2)
|
|
SECTIONS: SHF_ALLOC (0x2)
|
|
SECTIONS: ]
|
|
SECTIONS: }
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 7
|
|
SECTIONS: Name: .eh_frame
|
|
SECTIONS: Type: SHT_PROGBITS (0x1)
|
|
SECTIONS: Flags [ (0x2)
|
|
SECTIONS: SHF_ALLOC (0x2)
|
|
SECTIONS: ]
|
|
SECTIONS: }
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 8
|
|
SECTIONS: Name: .eh_frame_hdr
|
|
SECTIONS: }
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 9
|
|
SECTIONS: Name: .init_array
|
|
SECTIONS: Type: SHT_PROGBITS (0x1)
|
|
SECTIONS: Flags [ (0x3)
|
|
SECTIONS: SHF_ALLOC (0x2)
|
|
SECTIONS: SHF_WRITE (0x1)
|
|
SECTIONS: ]
|
|
SECTIONS: }
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 10
|
|
SECTIONS: Name: .fini_array
|
|
SECTIONS: Type: SHT_PROGBITS (0x1)
|
|
SECTIONS: Flags [ (0x3)
|
|
SECTIONS: SHF_ALLOC (0x2)
|
|
SECTIONS: SHF_WRITE (0x1)
|
|
SECTIONS: ]
|
|
SECTIONS: }
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 11
|
|
SECTIONS: Name: .dynamic
|
|
SECTIONS: Type: SHT_DYNAMIC (0x6)
|
|
SECTIONS: Flags [ (0x3)
|
|
SECTIONS: SHF_ALLOC (0x2)
|
|
SECTIONS: SHF_WRITE (0x1)
|
|
SECTIONS: ]
|
|
SECTIONS: }
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 12
|
|
SECTIONS: Name: .got.plt
|
|
SECTIONS: Type: SHT_PROGBITS (0x1)
|
|
SECTIONS: Flags [ (0x3)
|
|
SECTIONS: SHF_ALLOC (0x2)
|
|
SECTIONS: SHF_WRITE (0x1)
|
|
SECTIONS: ]
|
|
SECTIONS: }
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 13
|
|
SECTIONS: Name: .data
|
|
SECTIONS: Type: SHT_PROGBITS (0x1)
|
|
SECTIONS: Flags [ (0x3)
|
|
SECTIONS: SHF_ALLOC (0x2)
|
|
SECTIONS: SHF_WRITE (0x1)
|
|
SECTIONS: ]
|
|
SECTIONS: }
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 14
|
|
SECTIONS: Name: .bss
|
|
SECTIONS: Type: SHT_NOBITS (0x8)
|
|
SECTIONS: Flags [ (0x3)
|
|
SECTIONS: SHF_ALLOC (0x2)
|
|
SECTIONS: SHF_WRITE (0x1)
|
|
SECTIONS: ]
|
|
SECTIONS: }
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 15
|
|
SECTIONS: Name: .comment
|
|
SECTIONS: Type: SHT_PROGBITS (0x1)
|
|
SECTIONS: Flags [ (0x0)
|
|
SECTIONS: ]
|
|
SECTIONS: }
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 16
|
|
SECTIONS: Name: .note.GNU-stack
|
|
SECTIONS: Type: SHT_PROGBITS (0x1)
|
|
SECTIONS: Flags [ (0x0)
|
|
SECTIONS: ]
|
|
SECTIONS: }
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 17
|
|
SECTIONS: Name: .shstrtab
|
|
SECTIONS: Type: SHT_STRTAB (0x3)
|
|
SECTIONS: Flags [ (0x0)
|
|
SECTIONS: ]
|
|
SECTIONS: }
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 18
|
|
SECTIONS: Name: .symtab
|
|
SECTIONS: Type: SHT_SYMTAB (0x2)
|
|
SECTIONS: Flags [ (0x0)
|
|
SECTIONS: ]
|
|
SECTIONS: }
|
|
SECTIONS: Section {
|
|
SECTIONS: Index: 19
|
|
SECTIONS: Name: .strtab
|
|
SECTIONS: Type: SHT_STRTAB (0x3)
|
|
SECTIONS: Flags [ (0x0)
|
|
SECTIONS: ]
|
|
SECTIONS: }
|