# Check that .MIPS.options sections from shared libraries do not affect # output .MIPS.options section content. # RUN: yaml2obj -format=elf -docnum 1 %s > %t.so.o # RUN: lld -flavor old-gnu -target mips64el -shared -o %t.so %t.so.o # RUN: yaml2obj -format=elf -docnum 2 %s > %t.exe.o # RUN: lld -flavor old-gnu -target mips64el -e T0 -o %t.exe %t.so %t.exe.o # RUN: llvm-objdump -s -t %t.exe | FileCheck %s # CHECK: Contents of section .MIPS.options: # CHECK-NEXT: {{[0-9a-f]+}} 01280000 00000000 44444444 00000000 # CHECK-NEXT: {{[0-9a-f]+}} 44444444 44444444 44444444 44444444 # CHECK-NEXT: {{[0-9a-f]+}} f08f0020 01000000 # CHECK: SYMBOL TABLE: # CHECK: 20008ff0 g *ABS* 00000000 _gp # t.so.o --- FileHeader: Class: ELFCLASS64 Data: ELFDATA2LSB Type: ET_REL Machine: EM_MIPS Flags: [EF_MIPS_CPIC, EF_MIPS_PIC, EF_MIPS_ARCH_64R2] Sections: - Name: .text Type: SHT_PROGBITS Size: 4 AddressAlign: 16 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] - Name: .MIPS.options Type: SHT_MIPS_OPTIONS Flags: [ SHF_ALLOC ] AddressAlign: 8 Content: "01280000000000001111111100000000111111111111111111111111111111110010000000000000" Symbols: Global: - Name: T1 Section: .text Type: STT_FUNC Value: 0 Size: 4 # t.exe.o --- FileHeader: Class: ELFCLASS64 Data: ELFDATA2LSB Type: ET_REL Machine: EM_MIPS Flags: [EF_MIPS_CPIC, EF_MIPS_PIC, EF_MIPS_ARCH_64R2] Sections: - Name: .text Type: SHT_PROGBITS Size: 4 AddressAlign: 16 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] - Name: .MIPS.options Type: SHT_MIPS_OPTIONS Flags: [ SHF_ALLOC ] AddressAlign: 8 Content: "01280000000000004444444400000000444444444444444444444444444444440010000000000000" Symbols: Global: - Name: T0 Section: .text Type: STT_FUNC Value: 0 Size: 4 ...