[lld] r210469 - [Mips] Make dt-textrel.test test case independent from external input files.

Simon Atanasyan simon at atanasyan.com
Mon Jun 9 06:45:59 PDT 2014


Author: atanasyan
Date: Mon Jun  9 08:45:58 2014
New Revision: 210469

URL: http://llvm.org/viewvc/llvm-project?rev=210469&view=rev
Log:
[Mips] Make dt-textrel.test test case independent from external input files.

Modified:
    lld/trunk/test/elf/Mips/dt-textrel.test

Modified: lld/trunk/test/elf/Mips/dt-textrel.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/dt-textrel.test?rev=210469&r1=210468&r2=210469&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/dt-textrel.test (original)
+++ lld/trunk/test/elf/Mips/dt-textrel.test Mon Jun  9 08:45:58 2014
@@ -1,14 +1,40 @@
 # Check that if a dynamic relocation modify a read-only section,
 # .dynamic section contains the DT_TEXTREL tag.
 
-# RUN: yaml2obj -format=elf %S/Inputs/pic-obj.yaml > %t-so-obj
-# RUN: lld -flavor gnu -target mipsel -shared -o %t-so %t-so-obj
-# RUN: yaml2obj -format=elf %s > %t-obj
-# RUN: lld -flavor gnu -target mipsel -e T0 -o %t-exe %t-obj %t-so
-# RUN: llvm-readobj -dynamic-table %t-exe | FileCheck %s
+# RUN: yaml2obj -format=elf -docnum 1 %s > %t-so.o
+# RUN: lld -flavor gnu -target mipsel -shared -o %t.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.so
+# RUN: llvm-readobj -dynamic-table %t.exe | FileCheck %s
 
 # CHECK: 0x{{[0-9A-F]+}} TEXTREL
 
+# so.o
+---
+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:         0x04
+  AddressAlign: 16
+  Flags:        [SHF_EXECINSTR, SHF_ALLOC]
+
+Symbols:
+  Global:
+    - Name:    T1
+      Section: .text
+      Type:    STT_FUNC
+      Value:   0x0
+      Size:    0x04
+
+# o.o
+---
 FileHeader:
   Class:           ELFCLASS32
   Data:            ELFDATA2LSB
@@ -45,3 +71,4 @@ Symbols:
       Section:         .text
       Size:            0x04
     - Name:            T1
+...





More information about the llvm-commits mailing list