[lld] r214641 - [Mips] Replace assembler code by YAML to make the 'gotsym.test' test
Simon Atanasyan
simon at atanasyan.com
Sat Aug 2 13:18:31 PDT 2014
Author: atanasyan
Date: Sat Aug 2 15:18:31 2014
New Revision: 214641
URL: http://llvm.org/viewvc/llvm-project?rev=214641&view=rev
Log:
[Mips] Replace assembler code by YAML to make the 'gotsym.test' test
target independent.
Modified:
lld/trunk/test/elf/Mips/gotsym.test
Modified: lld/trunk/test/elf/Mips/gotsym.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/gotsym.test?rev=214641&r1=214640&r2=214641&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/gotsym.test (original)
+++ lld/trunk/test/elf/Mips/gotsym.test Sat Aug 2 15:18:31 2014
@@ -1,10 +1,8 @@
-# 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
@@ -14,8 +12,8 @@
# 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
@@ -25,8 +23,21 @@
# 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
More information about the llvm-commits
mailing list