llvm-project/lld/test/elf/Mips/mips-options-04.test

78 lines
1.9 KiB
Plaintext

# Check that .MIPS.options sections from shared libraries do not affect
# output .MIPS.options section content.
# RUN: yaml2obj -format=elf -docnum 1 %s > %t.so.o
# RUN: lld -flavor gnu -target mips64el -shared -o %t.so %t.so.o
# RUN: yaml2obj -format=elf -docnum 2 %s > %t.exe.o
# RUN: lld -flavor gnu -target mips64el -e T0 -o %t.exe %t.so %t.exe.o
# RUN: llvm-objdump -s -t %t.exe | FileCheck %s
# CHECK: Contents of section .MIPS.options:
# CHECK-NEXT: 120001000 01280000 00000000 44444444 00000000
# CHECK-NEXT: 120001010 44444444 44444444 44444444 44444444
# CHECK-NEXT: 120001020 f09f0020 01000000
# CHECK: SYMBOL TABLE:
# CHECK: 20009ff0 g *ABS* 00000000 _gp
# t.so.o
---
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_MIPS
Flags: [EF_MIPS_CPIC, EF_MIPS_PIC, EF_MIPS_ARCH_64R2]
Sections:
- Name: .text
Type: SHT_PROGBITS
Size: 4
AddressAlign: 16
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
- Name: .MIPS.options
Type: SHT_MIPS_OPTIONS
Flags: [ SHF_ALLOC ]
AddressAlign: 8
Content: "01280000000000001111111100000000111111111111111111111111111111110010000000000000"
Symbols:
Global:
- Name: T1
Section: .text
Type: STT_FUNC
Value: 0
Size: 4
# t.exe.o
---
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_MIPS
Flags: [EF_MIPS_CPIC, EF_MIPS_PIC, EF_MIPS_ARCH_64R2]
Sections:
- Name: .text
Type: SHT_PROGBITS
Size: 4
AddressAlign: 16
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
- Name: .MIPS.options
Type: SHT_MIPS_OPTIONS
Flags: [ SHF_ALLOC ]
AddressAlign: 8
Content: "01280000000000004444444400000000444444444444444444444444444444440010000000000000"
Symbols:
Global:
- Name: T0
Section: .text
Type: STT_FUNC
Value: 0
Size: 4
...