[lld] r213690 - [Mips] Replace assembler code by YAML to make the 'entry-name.test' test target

Simon Atanasyan simon at atanasyan.com
Tue Jul 22 14:47:34 PDT 2014


Author: atanasyan
Date: Tue Jul 22 16:47:34 2014
New Revision: 213690

URL: http://llvm.org/viewvc/llvm-project?rev=213690&view=rev
Log:
[Mips] Replace assembler code by YAML to make the 'entry-name.test' test target
independent.

Modified:
    lld/trunk/test/elf/Mips/entry-name.test

Modified: lld/trunk/test/elf/Mips/entry-name.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/entry-name.test?rev=213690&r1=213689&r2=213690&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/entry-name.test (original)
+++ lld/trunk/test/elf/Mips/entry-name.test Tue Jul 22 16:47:34 2014
@@ -1,16 +1,26 @@
-# REQUIRES: mips
-
 # Check name of executable entry symbol.
-# RUN: llvm-mc -triple=mipsel -filetype=obj -o=%t1 %s
-# RUN: lld -flavor gnu -target mipsel --noinhibit-exec -o %t2 %t1
-# RUN: llvm-objdump -t %t2 | FileCheck %s
+# RUN: yaml2obj -format=elf %s > %t.o
+# RUN: lld -flavor gnu -target mipsel --noinhibit-exec -o %t.exe %t.o
+# RUN: llvm-nm %t.exe | FileCheck %s
+
+# CHECK:          U __start
+# CHECK: 00400108 T main
+
+FileHeader:
+  Class:           ELFCLASS32
+  Data:            ELFDATA2LSB
+  Type:            ET_REL
+  Machine:         EM_MIPS
+  Flags:           [ EF_MIPS_ABI_O32, EF_MIPS_ARCH_32 ]
 
-# CHECK: SYMBOL TABLE:
-# CHECK: {{[0-9a-f]+}} g     F .text  00000004 main
-# CHECK: 00000000              *UND*  00000000 __start
+Sections:
+  - Name:            .text
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
+    AddressAlign:    0x04
+    Size:            0x04
 
-    .global main
-    .ent    main
-main:
-    nop
-    .end    main
+Symbols:
+  Global:
+    - Name:            main
+      Section:         .text





More information about the llvm-commits mailing list