2015-04-05 03:13:32 +08:00
|
|
|
# Check that .reginfo sections from shared libraries do not affect
|
|
|
|
# output .reginfo section content.
|
|
|
|
|
|
|
|
# RUN: yaml2obj -format=elf -docnum 1 %s > %t.so.o
|
|
|
|
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t.so.o
|
|
|
|
# RUN: yaml2obj -format=elf -docnum 2 %s > %t.exe.o
|
|
|
|
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.so %t.exe.o
|
|
|
|
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s
|
|
|
|
|
|
|
|
# CHECK: Contents of section .reginfo:
|
2015-04-16 02:32:22 +08:00
|
|
|
# CHECK-NEXT: {{[0-9a-f]+}} 44444444 44444444 44444444 44444444
|
|
|
|
# CHECK-NEXT: {{[0-9a-f]+}} 44444444 f08f4000
|
2015-04-05 03:13:32 +08:00
|
|
|
|
|
|
|
# CHECK: SYMBOL TABLE:
|
|
|
|
# CHECK: 00408ff0 g *ABS* 00000000 _gp
|
|
|
|
|
|
|
|
# t.so.o
|
|
|
|
---
|
|
|
|
FileHeader:
|
|
|
|
Class: ELFCLASS32
|
|
|
|
Data: ELFDATA2LSB
|
|
|
|
Type: ET_REL
|
|
|
|
Machine: EM_MIPS
|
|
|
|
Flags: [EF_MIPS_CPIC, EF_MIPS_PIC, 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: "111111111111111111111111111111111111111100100000"
|
|
|
|
|
|
|
|
Symbols:
|
|
|
|
Global:
|
|
|
|
- Name: T1
|
|
|
|
Section: .text
|
|
|
|
Type: STT_FUNC
|
|
|
|
Value: 0
|
|
|
|
Size: 4
|
|
|
|
|
|
|
|
# t.exe.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: "444444444444444444444444444444444444444400000000"
|
|
|
|
|
|
|
|
Symbols:
|
|
|
|
Global:
|
|
|
|
- Name: T0
|
|
|
|
Section: .text
|
|
|
|
Type: STT_FUNC
|
|
|
|
Value: 0
|
|
|
|
Size: 4
|
|
|
|
...
|