llvm-project/lld/test/elf/Mips/plt-entry-mixed-4.test

86 lines
2.0 KiB
Plaintext

# REQUIRES: mips
# Conditions:
# a) Object file contains R_MIPS_26 relocation refers to the microMIPS symbol.
# Check:
# a) PLT contains a regular non-compressed entry.
# Build shared library
# RUN: yaml2obj -format=elf -docnum 1 %s > %t.so.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t.so.o
# Build executable
# RUN: yaml2obj -format=elf -docnum 2 %s > %t.o.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o.o %t.so
# RUN: llvm-objdump -s %t.exe | FileCheck %s
# FIXME (simon): Check the disassembler output when llvm-objdump starts
# to support microMIPS instruction encoding.
# CHECK: Contents of section .plt:
# CHECK-NEXT: 400170 40001c3c 0020998f 00209c27 23c01c03 @..<. ... .'#...
# CHECK-NEXT: 400180 2178e003 82c01800 09f82003 feff1827 !x........ ....'
# CHECK-NEXT: 400190 40000f3c 0820f98d 08002003 0820f825 @..<. .... .. .%
# so.o
---
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_MIPS
Flags: [EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_ABI_O32,
EF_MIPS_ARCH_32R2, EF_MIPS_MICROMIPS]
Sections:
- Name: .text
Type: SHT_PROGBITS
Size: 0x0C
AddressAlign: 16
Flags: [SHF_EXECINSTR, SHF_ALLOC]
Symbols:
Global:
- Name: T1
Section: .text
Type: STT_FUNC
Value: 0x0
Size: 4
Other: [STO_MIPS_MICROMIPS]
# o.o
---
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_MIPS
Flags: [EF_MIPS_CPIC, EF_MIPS_ABI_O32,
EF_MIPS_ARCH_32R2, EF_MIPS_MICROMIPS]
Sections:
- Name: .text
Type: SHT_PROGBITS
Content: "0000000C00000000"
AddressAlign: 16
Flags: [SHF_EXECINSTR, SHF_ALLOC]
- Name: .rel.text
Type: SHT_REL
Info: .text
AddressAlign: 4
Relocations:
- Offset: 0x0
Symbol: T1
Type: R_MIPS_26
Symbols:
Global:
- Name: T0
Section: .text
Type: STT_FUNC
Value: 0x0
Size: 0x8
- Name: T1
...