[lld] r210987 - [Mips] Make gp-sym-2.test test case independent from external input files.

Simon Atanasyan simon at atanasyan.com
Sun Jun 15 05:04:40 PDT 2014


Author: atanasyan
Date: Sun Jun 15 07:04:40 2014
New Revision: 210987

URL: http://llvm.org/viewvc/llvm-project?rev=210987&view=rev
Log:
[Mips] Make gp-sym-2.test test case independent from external input files.

Modified:
    lld/trunk/test/elf/Mips/gp-sym-2.test

Modified: lld/trunk/test/elf/Mips/gp-sym-2.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/gp-sym-2.test?rev=210987&r1=210986&r2=210987&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/gp-sym-2.test (original)
+++ lld/trunk/test/elf/Mips/gp-sym-2.test Sun Jun 15 07:04:40 2014
@@ -8,13 +8,13 @@
 # library linking.
 # XFAIL: *
 
-# RUN: yaml2obj -format=elf %S/Inputs/pic-obj.yaml > %t-pic.o
-# RUN: lld -flavor gnu -target mipsel -shared -o %t-ext.so %t-pic.o
-# RUN: yaml2obj -format=elf %s > %t.o
-# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o %t-ext.so
+# RUN: yaml2obj -format=elf -docnum 1 %s > %t-so.o
+# RUN: lld -flavor gnu -target mipsel -shared -o %t-1.so %t-so.o
+# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
+# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t-o.o %t-1.so
 # RUN: llvm-readobj -r %t.exe | FileCheck -check-prefix=EXE %s
-# RUN: lld -flavor gnu -target mipsel -shared -o %t.exe %t.o %t-ext.so
-# RUN: llvm-readobj -r %t.exe | FileCheck -check-prefix=SO %s
+# RUN: lld -flavor gnu -target mipsel -shared -o %t-2.so %t-o.o %t-1.so
+# RUN: llvm-readobj -r %t-2.so | FileCheck -check-prefix=SO %s
 
 # EXE:      Relocations [
 # EXE-NEXT: ]
@@ -26,6 +26,37 @@
 # SO-NEXT:   }
 # SO-NEXT: ]
 
+# so.so
+---
+FileHeader:
+  Class:   ELFCLASS32
+  Data:    ELFDATA2LSB
+  Type:    ET_REL
+  Machine: EM_MIPS
+  Flags:   [EF_MIPS_PIC, EF_MIPS_CPIC]
+
+Sections:
+  - Name:         .text
+    Type:         SHT_PROGBITS
+    Size:         0x0C
+    AddressAlign: 16
+    Flags:        [SHF_EXECINSTR, SHF_ALLOC]
+
+Symbols:
+  Global:
+    - Name:    T1
+      Section: .text
+      Type:    STT_FUNC
+      Value:   0x0
+      Size:    4
+    - Name:    T2
+      Section: .text
+      Type:    STT_FUNC
+      Value:   0x4
+      Size:    4
+
+# o.o
+---
 FileHeader:
   Class:           ELFCLASS32
   Data:            ELFDATA2LSB
@@ -69,3 +100,4 @@ Symbols:
     - Name:            __gnu_local_gp
     - Name:            T1
     - Name:            T2
+...





More information about the llvm-commits mailing list