# Check merging input .MIPS.options sections. # RUN: yaml2obj -format=elf -docnum 1 %s > %t1.o # RUN: yaml2obj -format=elf -docnum 2 %s > %t2.o # RUN: lld -flavor old-gnu -target mips64el -shared -o %t.so %t1.o %t2.o # RUN: llvm-readobj -s -dynamic-table %t.so | FileCheck -check-prefix=SEC %s # RUN: llvm-objdump -s -t %t.so | FileCheck -check-prefix=RAW %s # RUN: llvm-readobj -program-headers %t.so | FileCheck -check-prefix=PHDR %s # SEC: Index: 1 # SEC-NEXT: Name: .MIPS.options (1) # SEC-NEXT: Type: SHT_MIPS_OPTIONS (0x7000000D) # SEC-NEXT: Flags [ (0x8000002) # SEC-NEXT: SHF_ALLOC (0x2) # SEC-NEXT: SHF_MIPS_NOSTRIP (0x8000000) # SEC-NEXT: ] # SEC-NEXT: Address: 0x[[OPT_ADDR:[0-9A-F]+]] # SEC-NEXT: Offset: {{[0-9A-F]+}} # SEC-NEXT: Size: 40 # SEC-NEXT: Link: 0 # SEC-NEXT: Info: 0 # SEC-NEXT: AddressAlignment: 8 # SEC-NEXT: EntrySize: 1 # SEC: DynamicSection [ # SEC: 0x{{[0-9A-F]+}} MIPS_OPTIONS 0x[[OPT_ADDR]] # RAW: Contents of section .MIPS.options: # RAW-NEXT: {{[0-9a-f]+}} 01280000 00000000 f0000001 00000000 # RAW-NEXT: {{[0-9a-f]+}} e0000002 d0000003 b0000004 c0000005 # RAW-NEXT: {{[0-9a-f]+}} f08f0000 00000000 # RAW: SYMBOL TABLE: # RAW: 0000000000008ff0 g *ABS* 00000000 _gp # Check that %t.so contains only two PT_LOAD segments # PHDR: ProgramHeaders # PHDR: Type: PT_LOAD # PHDR: Type: PT_LOAD # PHDR-NOT: Type: PT_LOAD # PHDR: Type: PT_DYNAMIC # t1.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 # v ODK_NULL 0x18 bytes long v ODK_REGINFO Content: "0018000000000000000000000000000000000000000000000128000000000000F000000000000000E0000000D0000000B0000000C00000000010000000000000" Symbols: Global: - Name: T0 Section: .text Type: STT_FUNC Value: 0 Size: 4 # t2.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 # v ODK_NULL 0x18 bytes long v ODK_REGINFO Content: "00180000000000000000000000000000000000000000000001280000000000000000000100000000000000020000000300000004000000050000010000000000" Symbols: Global: - Name: T1 Section: .text Type: STT_FUNC Value: 0 Size: 4 ...