diff options
Diffstat (limited to 'test/old-elf/Mips/exe-fileheader-micro-64.test')
-rw-r--r-- | test/old-elf/Mips/exe-fileheader-micro-64.test | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/test/old-elf/Mips/exe-fileheader-micro-64.test b/test/old-elf/Mips/exe-fileheader-micro-64.test new file mode 100644 index 0000000000000..a37d2d7106376 --- /dev/null +++ b/test/old-elf/Mips/exe-fileheader-micro-64.test @@ -0,0 +1,68 @@ +# Check ELF Header for 64-bit executable file in case of microMIPS entry symbol. + +# Build executable +# RUN: yaml2obj -format=elf %s > %t-o.o +# RUN: lld -flavor old-gnu -target mips64el -e glob -o %t.exe %t-o.o +# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s + +# CHECK: Format: ELF64-mips +# CHECK: Arch: mips64el +# CHECK: AddressSize: 64bit +# CHECK: LoadName: +# CHECK: ElfHeader { +# CHECK: Ident { +# CHECK: Magic: (7F 45 4C 46) +# CHECK: Class: 64-bit (0x2) +# CHECK: DataEncoding: LittleEndian (0x1) +# CHECK: FileVersion: 1 +# CHECK: OS/ABI: SystemV (0x0) +# CHECK: ABIVersion: 0 +# CHECK: Unused: (00 00 00 00 00 00 00) +# CHECK: } +# CHECK: Type: Executable (0x2) +# CHECK: Machine: EM_MIPS (0x8) +# CHECK: Version: 1 +# CHECK: Entry: 0x{{[0-9A-F]+}} +# CHECK: ProgramHeaderOffset: 0x{{[0-9A-F]+}} +# CHECK: SectionHeaderOffset: 0x{{[0-9A-F]+}} +# CHECK: Flags [ (0x82000007) +# CHECK: EF_MIPS_ARCH_64R2 (0x80000000) +# CHECK: EF_MIPS_CPIC (0x4) +# CHECK: EF_MIPS_MICROMIPS (0x2000000) +# CHECK: EF_MIPS_NOREORDER (0x1) +# CHECK: EF_MIPS_PIC (0x2) +# CHECK: ] +# CHECK: HeaderSize: 64 +# CHECK: ProgramHeaderEntrySize: 56 +# CHECK: ProgramHeaderCount: 6 +# CHECK: SectionHeaderEntrySize: 64 +# CHECK: SectionHeaderCount: 12 +# CHECK: StringTableSectionIndex: 9 +# CHECK: } + +# o.o +--- +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_MIPS + Flags: [ EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC, + EF_MIPS_MICROMIPS, EF_MIPS_ARCH_64R2 ] +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + AddressAlign: 0x10 + Size: 0x08 + +Symbols: + Local: + - Name: .text + Type: STT_SECTION + Section: .text + Global: + - Name: glob + Section: .text + Other: [ STO_MIPS_MICROMIPS ] +... |