[lld] r211463 - [Mips] Make rel-dynamic-01.test test case independent from external input files.
Simon Atanasyan
simon at atanasyan.com
Sun Jun 22 04:58:08 PDT 2014
Author: atanasyan
Date: Sun Jun 22 06:58:08 2014
New Revision: 211463
URL: http://llvm.org/viewvc/llvm-project?rev=211463&view=rev
Log:
[Mips] Make rel-dynamic-01.test test case independent from external input files.
Modified:
lld/trunk/test/elf/Mips/rel-dynamic-01.test
Modified: lld/trunk/test/elf/Mips/rel-dynamic-01.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/rel-dynamic-01.test?rev=211463&r1=211462&r2=211463&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/rel-dynamic-01.test (original)
+++ lld/trunk/test/elf/Mips/rel-dynamic-01.test Sun Jun 22 06:58:08 2014
@@ -9,12 +9,12 @@
# c) STO_MIPS_PLT flag in the dynamic symbol table for symbols require
# a pointer equality.
#
-# 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 %t1-exe %t-obj %t-so
-# RUN: llvm-objdump -disassemble %t1-exe | FileCheck -check-prefix=PLT %s
-# RUN: llvm-readobj -dt -r %t1-exe | FileCheck -check-prefix=PLT-SYM %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-objdump -disassemble %t.exe | FileCheck -check-prefix=PLT %s
+# RUN: llvm-readobj -dt -r %t.exe | FileCheck -check-prefix=PLT-SYM %s
# PLT: Disassembly of section .plt:
# PLT-NEXT: .plt:
@@ -115,7 +115,58 @@
# PLT-SYM-NEXT: }
# PLT-SYM-NEXT: ]
-!ELF
+# 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: 0x0C
+ AddressAlign: 16
+ Flags: [SHF_EXECINSTR, SHF_ALLOC]
+
+- Name: .data
+ Type: SHT_PROGBITS
+ Size: 0x08
+ AddressAlign: 16
+ Flags: [SHF_WRITE, 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
+ - Name: T3
+ Section: .text
+ Type: STT_FUNC
+ Value: 0x8
+ Size: 4
+ - Name: D1
+ Section: .data
+ Type: STT_OBJECT
+ Value: 0x0
+ Size: 4
+ - Name: D2
+ Section: .data
+ Type: STT_OBJECT
+ Value: 0x4
+ Size: 4
+
+# o.o
+---
FileHeader: !FileHeader
Class: ELFCLASS32
Data: ELFDATA2LSB
@@ -126,13 +177,13 @@ FileHeader: !FileHeader
Sections:
- Name: .text
Type: SHT_PROGBITS
- Content: "0000000000000000"
+ Size: 0x08
AddressAlign: 16
Flags: [SHF_EXECINSTR, SHF_ALLOC]
- Name: .data
Type: SHT_PROGBITS
- Content: "0000000000000000"
+ Size: 0x08
AddressAlign: 16
Flags: [SHF_WRITE, SHF_ALLOC]
@@ -192,3 +243,4 @@ Symbols:
Type: STT_OBJECT
- Name: D2
Type: STT_OBJECT
+...
More information about the llvm-commits
mailing list