# Check that we do not create LA26 stubs and PLT entries # when a PIC function is called from PIC code. # RUN: yaml2obj -format=elf -docnum 1 %s > %t.o # RUN: yaml2obj -format=elf -docnum 2 %s > %t-reg.o # RUN: yaml2obj -format=elf -docnum 3 %s > %t-micro.o # RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o %t-reg.o %t-micro.o # RUN: llvm-objdump -s -t %t.exe | FileCheck %s # CHECK-NOT: Contents of section .plt: # CHECK: Contents of section .text: # CHECK-NEXT: 400110 00000000 00000000 44001000 fdff0000 # ^ T1 ^ T2 ^ T1 (0x400110) # ^ 0x40011c - 12 = 0x0x400110 # CHECK-NEXT: 400120 fcff1f00 fbffff03 20008a00 74000000 # ^ T2 (0x400114) # CHECK: SYMBOL TABLE: # CHECK: 00400110 g F .text 00000004 T1 # CHECK: 00400114 g F .text 00000004 T2 # CHECK: 00400118 g F .text 00000010 T0 # CHECK: 00400128 g F .text 00000014 T3 # pic.o --- FileHeader: Class: ELFCLASS32 Data: ELFDATA2LSB Type: ET_REL Machine: EM_MIPS Flags: [EF_MIPS_ABI_O32, EF_MIPS_ARCH_32, EF_MIPS_CPIC, EF_MIPS_PIC, EF_MIPS_MICROMIPS] Sections: - Name: .text Type: SHT_PROGBITS Size: 8 AddressAlign: 16 Flags: [SHF_EXECINSTR, SHF_ALLOC] Symbols: Global: - Name: T1 Section: .text Type: STT_FUNC Value: 0 Size: 4 - Name: T2 Section: .text Type: STT_FUNC Value: 4 Size: 4 Other: [STO_MIPS_MICROMIPS] # reg.o --- FileHeader: Class: ELFCLASS32 Data: ELFDATA2LSB 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 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] AddressAlign: 4 Size: 16 - Name: .rel.text Type: SHT_REL Link: .symtab AddressAlign: 0x04 Info: .text Relocations: - Offset: 0 Symbol: T1 Type: R_MIPS_26 - Offset: 4 Symbol: T1 Type: R_MIPS_PC16 - Offset: 8 Symbol: T1 Type: R_MIPS_PC21_S2 - Offset: 12 Symbol: T1 Type: R_MIPS_PC26_S2 Symbols: Global: - Name: T0 Section: .text Size: 16 - Name: T1 # micro.o --- FileHeader: Class: ELFCLASS32 Data: ELFDATA2LSB Type: ET_REL Machine: EM_MIPS Flags: [EF_MIPS_ABI_O32, EF_MIPS_ARCH_32, EF_MIPS_CPIC, EF_MIPS_PIC, EF_MIPS_MICROMIPS] Sections: - Name: .text Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_EXECINSTR ] AddressAlign: 4 Size: 20 - Name: .rel.text Type: SHT_REL Link: .symtab AddressAlign: 0x04 Info: .text Relocations: - Offset: 0 Symbol: T2 Type: R_MICROMIPS_26_S1 - Offset: 4 Symbol: T2 Type: R_MICROMIPS_PC7_S1 - Offset: 8 Symbol: T2 Type: R_MICROMIPS_PC10_S1 - Offset: 12 Symbol: T2 Type: R_MICROMIPS_PC16_S1 - Offset: 16 Symbol: T2 Type: R_MICROMIPS_PC23_S2 Symbols: Global: - Name: T3 Section: .text Size: 20 Other: [STO_MIPS_MICROMIPS] - Name: T2 ...