case ELF::EM_MIPS:
ECase(SHT_MIPS_REGINFO)
ECase(SHT_MIPS_OPTIONS)
+ ECase(SHT_MIPS_ABIFLAGS)
default:
// Nothing to do.
break;
# CHECK-OBJ: Section {
# CHECK-OBJ: Index: 5
# CHECK-OBJ: Name: .MIPS.abiflags (12)
-# CHECK-OBJ: Type: (0x7000002A)
+# CHECK-OBJ: Type: SHT_MIPS_ABIFLAGS (0x7000002A)
# CHECK-OBJ: Flags [ (0x2)
# CHECK-OBJ: SHF_ALLOC (0x2)
# CHECK-OBJ: ]
# CHECK-OBJ: Section {
# CHECK-OBJ: Index: 5
# CHECK-OBJ: Name: .MIPS.abiflags (12)
-# CHECK-OBJ: Type: (0x7000002A)
+# CHECK-OBJ: Type: SHT_MIPS_ABIFLAGS (0x7000002A)
# CHECK-OBJ: Flags [ (0x2)
# CHECK-OBJ: SHF_ALLOC (0x2)
# CHECK-OBJ: ]
# CHECK-OBJ: Section {
# CHECK-OBJ: Index: 5
# CHECK-OBJ: Name: .MIPS.abiflags (12)
-# CHECK-OBJ: Type: (0x7000002A)
+# CHECK-OBJ: Type: SHT_MIPS_ABIFLAGS (0x7000002A)
# CHECK-OBJ: Flags [ (0x2)
# CHECK-OBJ: SHF_ALLOC (0x2)
# CHECK-OBJ: ]
# CHECK-OBJ: Section {
# CHECK-OBJ: Index: 5
# CHECK-OBJ: Name: .MIPS.abiflags (12)
-# CHECK-OBJ: Type: (0x7000002A)
+# CHECK-OBJ: Type: SHT_MIPS_ABIFLAGS (0x7000002A)
# CHECK-OBJ: Flags [ (0x2)
# CHECK-OBJ: SHF_ALLOC (0x2)
# CHECK-OBJ: ]
# CHECK-OBJ: Section {
# CHECK-OBJ: Index: 5
# CHECK-OBJ: Name: .MIPS.abiflags (12)
-# CHECK-OBJ: Type: (0x7000002A)
+# CHECK-OBJ: Type: SHT_MIPS_ABIFLAGS (0x7000002A)
# CHECK-OBJ: Flags [ (0x2)
# CHECK-OBJ: SHF_ALLOC (0x2)
# CHECK-OBJ: ]
# CHECK-OBJ: Section {
# CHECK-OBJ: Index: 5
# CHECK-OBJ: Name: .MIPS.abiflags (12)
-# CHECK-OBJ: Type: (0x7000002A)
+# CHECK-OBJ: Type: SHT_MIPS_ABIFLAGS (0x7000002A)
# CHECK-OBJ: Flags [ (0x2)
# CHECK-OBJ: SHF_ALLOC (0x2)
# CHECK-OBJ: ]
# CHECK-OBJ: Section {
# CHECK-OBJ: Index: 5
# CHECK-OBJ: Name: .MIPS.abiflags (12)
-# CHECK-OBJ: Type: (0x7000002A)
+# CHECK-OBJ: Type: SHT_MIPS_ABIFLAGS (0x7000002A)
# CHECK-OBJ: Flags [ (0x2)
# CHECK-OBJ: SHF_ALLOC (0x2)
# CHECK-OBJ: ]
# CHECK-OBJ: Section {
# CHECK-OBJ: Index: 5
# CHECK-OBJ: Name: .MIPS.abiflags (12)
-# CHECK-OBJ: Type: (0x7000002A)
+# CHECK-OBJ: Type: SHT_MIPS_ABIFLAGS (0x7000002A)
# CHECK-OBJ: Flags [ (0x2)
# CHECK-OBJ: SHF_ALLOC (0x2)
# CHECK-OBJ: ]
# CHECK-OBJ: Section {
# CHECK-OBJ: Index: 5
# CHECK-OBJ: Name: .MIPS.abiflags (12)
-# CHECK-OBJ: Type: (0x7000002A)
+# CHECK-OBJ: Type: SHT_MIPS_ABIFLAGS (0x7000002A)
# CHECK-OBJ: Flags [ (0x2)
# CHECK-OBJ: SHF_ALLOC (0x2)
# CHECK-OBJ: ]
# CHECK-OBJ-ALL: Section {
# CHECK-OBJ-ALL: Index: 5
# CHECK-OBJ-ALL: Name: .MIPS.abiflags ({{[0-9]+}})
-# CHECK-OBJ-ALL: Type: (0x7000002A)
+# CHECK-OBJ-ALL: Type: SHT_MIPS_ABIFLAGS (0x7000002A)
# CHECK-OBJ-ALL: Flags [ (0x2)
# CHECK-OBJ-ALL: SHF_ALLOC (0x2)
# CHECK-OBJ-ALL: ]
ELF-MIPSEL: FileHeader:
ELF-MIPSEL-NEXT: Class: ELFCLASS32
ELF-MIPSEL-NEXT: Data: ELFDATA2LSB
+ELF-MIPSEL-NEXT: OSABI: ELFOSABI_GNU
ELF-MIPSEL-NEXT: Type: ET_REL
ELF-MIPSEL-NEXT: Machine: EM_MIPS
ELF-MIPSEL-NEXT: Flags: [ EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32 ]
ELF-MIPSEL-NEXT: AddressAlign: 0x0000000000000004
ELF-MIPSEL-NEXT: Info: .text
ELF-MIPSEL-NEXT: Relocations:
-ELF-MIPSEL-NEXT: - Offset: 0
+ELF-MIPSEL-NEXT: - Offset: 0x0000000000000000
ELF-MIPSEL-NEXT: Symbol: _gp_disp
ELF-MIPSEL-NEXT: Type: R_MIPS_HI16
ELF-MIPSEL-NEXT: Addend: 0
ELF-MIPSEL-NEXT: Type: SHT_NOBITS
ELF-MIPSEL-NEXT: Flags: [ SHF_WRITE, SHF_ALLOC ]
ELF-MIPSEL-NEXT: AddressAlign: 0x0000000000000004
+ELF-MIPSEL-NEXT: Content: 48656C6C
+ELF-MIPSEL-NEXT: - Name: .mdebug.abi32
+ELF-MIPSEL-NEXT: Type: SHT_PROGBITS
+ELF-MIPSEL-NEXT: AddressAlign: 0x0000000000000001
ELF-MIPSEL-NEXT: Content: ''
ELF-MIPSEL-NEXT: - Name: .rodata.str1.1
ELF-MIPSEL-NEXT: Type: SHT_PROGBITS
ELF-MIPSEL-NEXT: Flags: [ SHF_ALLOC ]
ELF-MIPSEL-NEXT: AddressAlign: 0x0000000000000001
ELF-MIPSEL-NEXT: Content: '000000000000000000000000000000000000000000000000'
+ELF-MIPSEL-NEXT: - Name: .MIPS.abiflags
+ELF-MIPSEL-NEXT: Type: SHT_MIPS_ABIFLAGS
+ELF-MIPSEL-NEXT: Flags: [ SHF_ALLOC ]
+ELF-MIPSEL-NEXT: AddressAlign: 0x0000000000000008
+ELF-MIPSEL-NEXT: Content: '000020010101000100000000000000000100000000000000'
ELF-MIPSEL-NEXT: Symbols:
ELF-MIPSEL-NEXT: Local:
ELF-MIPSEL-NEXT: - Name: trivial.ll
ELF-MIPSEL-NEXT: - Name: .bss
ELF-MIPSEL-NEXT: Type: STT_SECTION
ELF-MIPSEL-NEXT: Section: .bss
+ELF-MIPSEL-NEXT: - Name: .mdebug.abi32
+ELF-MIPSEL-NEXT: Type: STT_SECTION
+ELF-MIPSEL-NEXT: Section: .mdebug.abi32
ELF-MIPSEL-NEXT: - Name: .rodata.str1.1
ELF-MIPSEL-NEXT: Type: STT_SECTION
ELF-MIPSEL-NEXT: Section: .rodata.str1.1
ELF-MIPSEL-NEXT: - Name: .reginfo
ELF-MIPSEL-NEXT: Type: STT_SECTION
ELF-MIPSEL-NEXT: Section: .reginfo
+ELF-MIPSEL-NEXT: - Name: .MIPS.abiflags
+ELF-MIPSEL-NEXT: Type: STT_SECTION
+ELF-MIPSEL-NEXT: Section: .MIPS.abiflags
ELF-MIPSEL-NEXT: Global:
ELF-MIPSEL-NEXT: - Name: main
ELF-MIPSEL-NEXT: Type: STT_FUNC
ELF-MIPSEL-NEXT: Section: .text
ELF-MIPSEL-NEXT: Size: 0x000000000000004C
+ELF-MIPSEL-NEXT: - Name: var
+ELF-MIPSEL-NEXT: Type: STT_OBJECT
+ELF-MIPSEL-NEXT: Section: .bss
+ELF-MIPSEL-NEXT: Size: 0x0000000000000004
ELF-MIPSEL-NEXT: - Name: SomeOtherFunction
ELF-MIPSEL-NEXT: - Name: _gp_disp
ELF-MIPSEL-NEXT: - Name: puts
RUN: | FileCheck %s -check-prefix COFF
RUN: llvm-readobj -s %p/Inputs/trivial.obj.elf-i386 \
RUN: | FileCheck %s -check-prefix ELF
+RUN: llvm-readobj -s %p/Inputs/trivial.obj.elf-mipsel \
+RUN: | FileCheck %s -check-prefix ELF-MIPSEL
RUN: llvm-readobj -s %p/Inputs/trivial.obj.macho-i386 \
RUN: | FileCheck %s -check-prefix MACHO-I386
RUN: llvm-readobj -s %p/Inputs/trivial.obj.macho-x86-64 \
ELF-NEXT: EntrySize: 0
ELF-NEXT: }
+ELF-MIPSEL: Section {
+ELF-MIPSEL: Index: 4
+ELF-MIPSEL-NEXT: Name: .reginfo (27)
+ELF-MIPSEL-NEXT: Type: SHT_MIPS_REGINFO (0x70000006)
+ELF-MIPSEL-NEXT: Flags [ (0x2)
+ELF-MIPSEL-NEXT: SHF_ALLOC (0x2)
+ELF-MIPSEL-NEXT: ]
+ELF-MIPSEL-NEXT: Address: 0x0
+ELF-MIPSEL-NEXT: Offset: 0x34
+ELF-MIPSEL-NEXT: Size: 24
+ELF-MIPSEL-NEXT: Link: 0
+ELF-MIPSEL-NEXT: Info: 0
+ELF-MIPSEL-NEXT: AddressAlignment: 1
+ELF-MIPSEL-NEXT: EntrySize: 0
+ELF-MIPSEL-NEXT: }
+ELF-MIPSEL-NEXT: Section {
+ELF-MIPSEL-NEXT: Index: 5
+ELF-MIPSEL-NEXT: Name: .MIPS.abiflags (12)
+ELF-MIPSEL-NEXT: Type: SHT_MIPS_ABIFLAGS (0x7000002A)
+ELF-MIPSEL-NEXT: Flags [ (0x2)
+ELF-MIPSEL-NEXT: SHF_ALLOC (0x2)
+ELF-MIPSEL-NEXT: ]
+ELF-MIPSEL-NEXT: Address: 0x0
+ELF-MIPSEL-NEXT: Offset: 0x50
+ELF-MIPSEL-NEXT: Size: 24
+ELF-MIPSEL-NEXT: Link: 0
+ELF-MIPSEL-NEXT: Info: 0
+ELF-MIPSEL-NEXT: AddressAlignment: 8
+ELF-MIPSEL-NEXT: EntrySize: 0
+ELF-MIPSEL-NEXT: }
+
MACHO-I386: Sections [
MACHO-I386-NEXT: Section {
MACHO-I386-NEXT: Index: 0
switch (Type) {
LLVM_READOBJ_ENUM_CASE(ELF, SHT_MIPS_REGINFO);
LLVM_READOBJ_ENUM_CASE(ELF, SHT_MIPS_OPTIONS);
+ LLVM_READOBJ_ENUM_CASE(ELF, SHT_MIPS_ABIFLAGS);
}
}