forked from OSchip/llvm-project
72 lines
1.8 KiB
Plaintext
72 lines
1.8 KiB
Plaintext
# Check jal => jalx conversion in case of mixed microMIPS and regular code.
|
|
|
|
# RUN: yaml2obj -format=elf %s > %t.o
|
|
# RUN: lld -flavor old-gnu -target mipsel -e T1 -o %t.exe %t.o
|
|
# RUN: llvm-objdump -s %t.exe | FileCheck -check-prefix=RAW %s
|
|
# RUN: llvm-nm %t.exe | FileCheck -check-prefix=SYM %s
|
|
|
|
# RAW: Contents of section .text:
|
|
# RAW-NEXT: 400130 00000000 4c001074 10f04d00 4e001074
|
|
|
|
# SYM: 00400138 T M1
|
|
# SYM: 00400130 T M2
|
|
# SYM: 0040013c T T1
|
|
# SYM: 00400134 T T2
|
|
|
|
FileHeader:
|
|
Class: ELFCLASS32
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_MIPS
|
|
Flags: [EF_MIPS_NOREORDER, EF_MIPS_CPIC, EF_MIPS_ABI_O32,
|
|
EF_MIPS_MICROMIPS, EF_MIPS_ARCH_32R2]
|
|
|
|
Sections:
|
|
- Name: .text
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
|
AddressAlign: 16
|
|
Content: "000000000000000c00f400000000000c"
|
|
# ^ M2 ^ T2 ^ M1 ^ T1
|
|
|
|
- Name: .rel.text
|
|
Type: SHT_REL
|
|
Link: .symtab
|
|
AddressAlign: 4
|
|
Info: .text
|
|
Relocations:
|
|
- Offset: 4
|
|
Symbol: M2
|
|
Type: R_MIPS_26
|
|
- Offset: 8
|
|
Symbol: T2
|
|
Type: R_MICROMIPS_26_S1
|
|
- Offset: 12
|
|
Symbol: M1
|
|
Type: R_MIPS_26
|
|
|
|
Symbols:
|
|
Global:
|
|
- Name: M2
|
|
Type: STT_FUNC
|
|
Section: .text
|
|
Value: 0
|
|
Size: 4
|
|
Other: [ STO_MIPS_MICROMIPS ]
|
|
- Name: T2
|
|
Type: STT_FUNC
|
|
Section: .text
|
|
Value: 4
|
|
Size: 4
|
|
- Name: M1
|
|
Type: STT_FUNC
|
|
Section: .text
|
|
Value: 8
|
|
Size: 4
|
|
Other: [ STO_MIPS_MICROMIPS ]
|
|
- Name: T1
|
|
Type: STT_FUNC
|
|
Section: .text
|
|
Value: 12
|
|
Size: 4
|