-# REQUIRES: mips
-
# Check _gp_disp and GOT_OFFSET_TABLE value
-# RUN: llvm-mc -triple=mipsel -filetype=obj -o=%t1 %s
-
-# RUN: lld -flavor gnu -target mipsel -shared --noinhibit-exec -o %t2 %t1
-# RUN: llvm-objdump -section-headers -t %t2 | FileCheck -check-prefix=SHARED %s
+#
+# RUN: yaml2obj -format=elf %s > %t.o
+# RUN: lld -flavor gnu -target mipsel -shared --noinhibit-exec -o %t.so %t.o
+# RUN: llvm-objdump -h -t %t.so | FileCheck -check-prefix=SHARED %s
# SHARED: Sections:
# SHARED: Idx Name Size Address Type
# SHARED: 00008ff0 g *ABS* 00000000 _gp
# SHARED: 00008ff0 g *ABS* 00000000 _gp_disp
-# RUN: lld -flavor gnu -target mipsel -e main --noinhibit-exec -o %t2 %t1
-# RUN: llvm-objdump -section-headers -t %t2 | FileCheck -check-prefix=EXE %s
+# RUN: lld -flavor gnu -target mipsel -e main --noinhibit-exec -o %t.exe %t.o
+# RUN: llvm-objdump -h -t %t.exe | FileCheck -check-prefix=EXE %s
# EXE: Sections:
# EXE: Idx Name Size Address Type
# EXE: 00408ff0 g *ABS* 00000000 _gp
# EXE: 00408ff0 g *ABS* 00000000 _gp_disp
- .global main
- .ent main
-main:
- nop
- .end main
+FileHeader:
+ Class: ELFCLASS32
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_MIPS
+ Flags: [ EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32 ]
+
+Sections:
+ - Name: .text
+ Type: SHT_PROGBITS
+ Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
+ AddressAlign: 0x10
+ Size: 0x04
+
+Symbols:
+ Global:
+ - Name: main
+ Section: .text