forked from OSchip/llvm-project
90 lines
2.1 KiB
Plaintext
90 lines
2.1 KiB
Plaintext
# Check merging input .reginfo sections.
|
|
|
|
# RUN: yaml2obj -format=elf -docnum 1 %s > %t1.o
|
|
# RUN: yaml2obj -format=elf -docnum 2 %s > %t2.o
|
|
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t1.o %t2.o
|
|
# RUN: llvm-readobj -s %t.so | FileCheck -check-prefix=SEC %s
|
|
# RUN: llvm-objdump -s -t %t.so | FileCheck -check-prefix=RAW %s
|
|
|
|
# SEC: Index: 1
|
|
# SEC-NEXT: Name: .reginfo (1)
|
|
# SEC-NEXT: Type: SHT_MIPS_REGINFO (0x70000006)
|
|
# SEC-NEXT: Flags [ (0x2)
|
|
# SEC-NEXT: SHF_ALLOC (0x2)
|
|
# SEC-NEXT: ]
|
|
# SEC-NEXT: Address: {{[0-9A-F]+}}
|
|
# SEC-NEXT: Offset: {{[0-9A-F]+}}
|
|
# SEC-NEXT: Size: 24
|
|
# SEC-NEXT: Link: 0
|
|
# SEC-NEXT: Info: 0
|
|
# SEC-NEXT: AddressAlignment: 4
|
|
# SEC-NEXT: EntrySize: 24
|
|
|
|
# RAW: Contents of section .reginfo:
|
|
# RAW-NEXT: {{[0-9a-f]+}} f0000001 e0000002 d0000003 c0000004
|
|
# RAW-NEXT: {{[0-9a-f]+}} b0000005 f08f0000
|
|
|
|
# RAW: SYMBOL TABLE:
|
|
# RAW: 00008ff0 g *ABS* 00000000 _gp
|
|
|
|
# t1.o
|
|
---
|
|
FileHeader:
|
|
Class: ELFCLASS32
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_MIPS
|
|
Flags: [EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2]
|
|
|
|
Sections:
|
|
- Name: .text
|
|
Type: SHT_PROGBITS
|
|
Size: 4
|
|
AddressAlign: 16
|
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
|
|
|
- Name: .reginfo
|
|
Type: SHT_MIPS_REGINFO
|
|
Flags: [ SHF_ALLOC ]
|
|
AddressAlign: 4
|
|
Content: "F0000000E0000000D0000000C0000000B000000000100000"
|
|
|
|
Symbols:
|
|
Global:
|
|
- Name: T0
|
|
Section: .text
|
|
Type: STT_FUNC
|
|
Value: 0
|
|
Size: 4
|
|
|
|
# t2.o
|
|
---
|
|
FileHeader:
|
|
Class: ELFCLASS32
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_MIPS
|
|
Flags: [EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2]
|
|
|
|
Sections:
|
|
- Name: .text
|
|
Type: SHT_PROGBITS
|
|
Size: 4
|
|
AddressAlign: 16
|
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
|
|
|
- Name: .reginfo
|
|
Type: SHT_MIPS_REGINFO
|
|
Flags: [ SHF_ALLOC ]
|
|
AddressAlign: 4
|
|
Content: "000000010000000200000003000000040000000500000100"
|
|
|
|
Symbols:
|
|
Global:
|
|
- Name: T1
|
|
Section: .text
|
|
Type: STT_FUNC
|
|
Value: 0
|
|
Size: 4
|
|
...
|