# 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 gnu -target mips -o %t.exe %t-npic.o %t-pic.o %t-main.o # RUN: llvm-objdump -disassemble %t.exe | FileCheck %s # CHECK: 400150: 3c 19 00 40 lui $25, 64 # CHECK-NEXT: 400154: 08 10 00 48 j 4194592 # CHECK-NEXT: 400158: 27 39 01 20 addiu $25, $25, 288 # CHECK-NEXT: 40015c: 00 00 00 00 nop # npic.o --- FileHeader: Class: ELFCLASS32 Data: ELFDATA2MSB Type: ET_REL Machine: EM_MIPS Flags: [EF_MIPS_ABI_O32, EF_MIPS_ARCH_32, EF_MIPS_CPIC] 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 # pic.o --- FileHeader: Class: ELFCLASS32 Data: ELFDATA2MSB Type: ET_REL Machine: EM_MIPS Flags: [EF_MIPS_ABI_O32, EF_MIPS_ARCH_32, EF_MIPS_CPIC, EF_MIPS_PIC] 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 # main.o --- FileHeader: Class: ELFCLASS32 Data: ELFDATA2MSB Type: ET_REL Machine: EM_MIPS Flags: [EF_MIPS_ABI_O32, EF_MIPS_ARCH_32, EF_MIPS_CPIC] Sections: - Name: .text Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_EXECINSTR ] AddressAlign: 4 Size: 40 - Name: .rel.text Type: SHT_REL Link: .symtab AddressAlign: 4 Info: .text Relocations: - Offset: 8 Symbol: .text Type: R_MIPS_26 - Offset: 16 Symbol: __start Type: R_MIPS_26 - Offset: 24 Symbol: T1N Type: R_MIPS_26 - Offset: 32 Symbol: T1 Type: R_MIPS_26 Symbols: Local: - Name: loc Section: .text Value: 16 - Name: .text Type: STT_SECTION Section: .text Global: - Name: __start Section: .text - Name: T1 - Name: T1N ...