| # 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 old-gnu -target mipsel -shared -o %t.so %t.so.o |
| # RUN: yaml2obj -format=elf -docnum 2 %s > %t.exe.o |
| # RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.so %t.exe.o |
| # RUN: llvm-readobj -t -mips-reginfo %t.exe | FileCheck %s |
| |
| # CHECK: Name: _gp |
| # CHECK-NEXT: 0x408FF0 |
| |
| # CHECK: MIPS RegInfo { |
| # CHECK-NEXT: GP: 0x408FF0 |
| # CHECK-NEXT: General Mask: 0x44444444 |
| # CHECK-NEXT: Co-Proc Mask0: 0x44444444 |
| # CHECK-NEXT: Co-Proc Mask1: 0x44444444 |
| # CHECK-NEXT: Co-Proc Mask2: 0x44444444 |
| # CHECK-NEXT: Co-Proc Mask3: 0x44444444 |
| # CHECK-NEXT: } |
| |
| # 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 |
| ... |