In case of MIPS O32 ABI linker should merge registers usage masks stored in the input .reginfo sections and save result into the output .reginfo section. The ABI states that the .reginfo section should be put into the separate segment. This requirement is not implemented in this patch. llvm-svn: 234103
94 lines
3.1 KiB
Plaintext
94 lines
3.1 KiB
Plaintext
# Check executable base address configuration. Base address should be
|
|
# equal to 0x400000 and the MIPS_BASE_ADDRESS dynamic tag's value should
|
|
# be the same.
|
|
# RUN: yaml2obj -format=elf %s > %t.o
|
|
# RUN: lld -flavor gnu -target mipsel --noinhibit-exec -o %t.exe %t.o
|
|
# RUN: llvm-readobj -dynamic-table -program-headers %t.exe | FileCheck %s
|
|
|
|
# CHECK: DynamicSection [ (13 entries)
|
|
# CHECK: Tag Type Name/Value
|
|
# CHECK-NEXT: 0x00000004 HASH 0x{{[0-9A-F]+}}
|
|
# CHECK-NEXT: 0x00000005 STRTAB 0x{{[0-9A-F]+}}
|
|
# CHECK-NEXT: 0x00000006 SYMTAB 0x{{[0-9A-F]+}}
|
|
# CHECK-NEXT: 0x0000000A STRSZ 1 (bytes)
|
|
# CHECK-NEXT: 0x0000000B SYMENT 16 (bytes)
|
|
# CHECK-NEXT: 0x70000001 MIPS_RLD_VERSION 1
|
|
# CHECK-NEXT: 0x70000005 MIPS_FLAGS NOTPOT
|
|
# CHECK-NEXT: 0x70000006 MIPS_BASE_ADDRESS 0x400000
|
|
# CHECK-NEXT: 0x7000000A MIPS_LOCAL_GOTNO 2
|
|
# CHECK-NEXT: 0x70000011 MIPS_SYMTABNO 1
|
|
# CHECK-NEXT: 0x70000013 MIPS_GOTSYM 0x1
|
|
# CHECK-NEXT: 0x00000003 PLTGOT 0x401000
|
|
# CHECK-NEXT: 0x00000000 NULL 0x0
|
|
# CHECK-NEXT: ]
|
|
|
|
# CHECK: ProgramHeaders [
|
|
# CHECK: ProgramHeader {
|
|
# CHECK: Type: PT_PHDR (0x6)
|
|
# CHECK: Offset: 0x34
|
|
# CHECK: VirtualAddress: 0x{{[0-9A-F]+}}
|
|
# CHECK: }
|
|
# CHECK: ProgramHeader {
|
|
# CHECK: Type: PT_INTERP (0x3)
|
|
# CHECK: Offset: 0xF4
|
|
# CHECK: VirtualAddress: 0x{{[0-9A-F]+}}
|
|
# CHECK: }
|
|
# CHECK: ProgramHeader {
|
|
# CHECK: Type: PT_LOAD (0x1)
|
|
# CHECK: Offset: 0x0
|
|
# CHECK: VirtualAddress: 0x{{[0-9A-F]+}}
|
|
# CHECK: }
|
|
# CHECK: ProgramHeader {
|
|
# CHECK: Type: PT_LOAD (0x1)
|
|
# CHECK: Offset: 0x1000
|
|
# CHECK: VirtualAddress: 0x{{[0-9A-F]+}}
|
|
# CHECK: }
|
|
# CHECK: ProgramHeader {
|
|
# CHECK: Type: PT_LOAD (0x1)
|
|
# CHECK: Offset: 0x2000
|
|
# CHECK: VirtualAddress: 0x{{[0-9A-F]+}}
|
|
# CHECK: }
|
|
# CHECK: ProgramHeader {
|
|
# CHECK: Type: PT_DYNAMIC (0x2)
|
|
# CHECK: Offset: 0x12C
|
|
# CHECK: VirtualAddress: 0x{{[0-9A-F]+}}
|
|
# CHECK: }
|
|
# CHECK: ]
|
|
|
|
FileHeader:
|
|
Class: ELFCLASS32
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_MIPS
|
|
Flags: [ EF_MIPS_ABI_O32, EF_MIPS_ARCH_32 ]
|
|
Sections:
|
|
- Name: .text
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
|
AddressAlign: 0x04
|
|
Size: 0x04
|
|
- Name: .data
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_WRITE, SHF_ALLOC ]
|
|
AddressAlign: 0x04
|
|
Size: 0x00
|
|
- Name: .bss
|
|
Type: SHT_NOBITS
|
|
Flags: [ SHF_WRITE, SHF_ALLOC ]
|
|
AddressAlign: 0x04
|
|
Size: 0x00
|
|
Symbols:
|
|
Local:
|
|
- Name: .text
|
|
Type: STT_SECTION
|
|
Section: .text
|
|
- Name: .data
|
|
Type: STT_SECTION
|
|
Section: .data
|
|
- Name: .bss
|
|
Type: STT_SECTION
|
|
Section: .bss
|
|
Global:
|
|
- Name: main
|
|
Section: .text
|