# REQUIRES: mips # Check LA25 stubs creation in the big-endian case. # RUN: yaml2obj -format=elf -docnum 1 %s > %t-npic.o # RUN: yaml2obj -format=elf -docnum 2 %s > %t-pic.o # RUN: yaml2obj -format=elf -docnum 3 %s > %t-main.o # RUN: lld -flavor old-gnu -target mips -o %t.exe %t-npic.o %t-pic.o %t-main.o # RUN: llvm-objdump -disassemble -mattr=micromips %t.exe | FileCheck %s # CHECK: 400170: 41 be 00 40 lui $fp, 64 # CHECK-NEXT: 400174: d4 20 00 a0 j 4194624 # CHECK-NEXT: 400178: 33 39 01 41 addiu $25, $25, 321 # CHECK-NEXT: 40017c: 00 00 00 00 nop --- FileHeader: Class: ELFCLASS32 Data: ELFDATA2MSB Type: ET_REL Machine: EM_MIPS Flags: [EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2, EF_MIPS_CPIC, EF_MIPS_MICROMIPS] Sections: - Name: .text Type: SHT_PROGBITS Size: 4 AddressAlign: 16 Flags: [SHF_EXECINSTR, SHF_ALLOC] Symbols: Global: - Name: T1N Section: .text Type: STT_FUNC Value: 0 Size: 4 Other: [ STO_MIPS_MICROMIPS ] # pic.o --- FileHeader: Class: ELFCLASS32 Data: ELFDATA2MSB Type: ET_REL Machine: EM_MIPS Flags: [EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2, EF_MIPS_CPIC, EF_MIPS_PIC, EF_MIPS_MICROMIPS] Sections: - Name: .text Type: SHT_PROGBITS Size: 4 AddressAlign: 16 Flags: [SHF_EXECINSTR, SHF_ALLOC] Symbols: Global: - Name: T1 Section: .text Type: STT_FUNC Value: 0 Size: 4 Other: [ STO_MIPS_MICROMIPS ] # main.o --- FileHeader: Class: ELFCLASS32 Data: ELFDATA2MSB Type: ET_REL Machine: EM_MIPS Flags: [EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2, EF_MIPS_CPIC, EF_MIPS_MICROMIPS] Sections: - Name: .text Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_EXECINSTR ] AddressAlign: 4 Content: '0000000000000000f400000000000000f400000000000000f400000000000000f400000000000000' # jal loc jal glob jal T1N jal T1 - Name: .rel.text Type: SHT_REL Link: .symtab AddressAlign: 4 Info: .text Relocations: - Offset: 8 Symbol: .text Type: R_MICROMIPS_26_S1 - Offset: 16 Symbol: glob Type: R_MICROMIPS_26_S1 - Offset: 24 Symbol: T1N Type: R_MICROMIPS_26_S1 - Offset: 32 Symbol: T1 Type: R_MICROMIPS_26_S1 Symbols: Local: - Name: loc Section: .text Value: 16 Size: 24 Other: [ STO_MIPS_MICROMIPS ] - Name: .text Type: STT_SECTION Section: .text Global: - Name: __start Section: .text Size: 16 Other: [ STO_MIPS_MICROMIPS ] - Name: T1 - Name: T1N ...