[lld] r210796 - [Mips] Make exe-dynamic.test test case independent from external input files.
Simon Atanasyan
simon at atanasyan.com
Thu Jun 12 09:46:48 PDT 2014
Author: atanasyan
Date: Thu Jun 12 11:46:47 2014
New Revision: 210796
URL: http://llvm.org/viewvc/llvm-project?rev=210796&view=rev
Log:
[Mips] Make exe-dynamic.test test case independent from external input files.
Modified:
lld/trunk/test/elf/Mips/exe-dynamic.test
Modified: lld/trunk/test/elf/Mips/exe-dynamic.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/exe-dynamic.test?rev=210796&r1=210795&r2=210796&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/exe-dynamic.test (original)
+++ lld/trunk/test/elf/Mips/exe-dynamic.test Thu Jun 12 11:46:47 2014
@@ -1,15 +1,13 @@
-# REQUIRES: mips
-
# Check MIPS specific tags in the dynamic table in case executable linking.
# Build shared library
-# 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 -docnum 1 %s > %t-so.o
+# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-so.o
# Build executable
-# RUN: llvm-mc -triple=mipsel -filetype=obj -o=%t-obj %s
-# RUN: lld -flavor gnu -target mipsel -e glob -o %t-exe %t-obj %t-so
-# RUN: llvm-readobj -dynamic-table %t-exe | FileCheck %s
+# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
+# RUN: lld -flavor gnu -target mipsel -e glob -o %t.exe %t-o.o %t.so
+# RUN: llvm-readobj -dynamic-table %t.exe | FileCheck %s
# CHECK: Format: ELF32-mips
# CHECK: Arch: mipsel
@@ -39,12 +37,74 @@
# CHECK-NEXT: 0x00000000 NULL 0x0
# CHECK-NEXT: ]
- .abicalls
- .global glob
- .ent glob
-loc:
- jal T1
-glob:
- jal loc
- jal glob
- .end glob
+# 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]
+
+Symbols:
+ Global:
+ - Name: T1
+ Section: .text
+ Type: STT_FUNC
+ Value: 0x0
+ Size: 4
+
+# o.o
+---
+FileHeader:
+ Class: ELFCLASS32
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_MIPS
+ Flags: [ EF_MIPS_PIC, EF_MIPS_CPIC,
+ EF_MIPS_ABI_O32, EF_MIPS_ARCH_32 ]
+Sections:
+ - Name: .text
+ Type: SHT_PROGBITS
+ Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
+ AddressAlign: 0x04
+ Content: 0000000C000000000000000C000000000000000C00000000
+ - Name: .rel.text
+ Type: SHT_REL
+ Link: .symtab
+ AddressAlign: 0x04
+ Info: .text
+ Relocations:
+ - Offset: 0x00
+ Symbol: T1
+ Type: R_MIPS_26
+ Addend: 0
+ - Offset: 0x08
+ Symbol: .text
+ Type: R_MIPS_26
+ Addend: 0
+ - Offset: 0x10
+ Symbol: glob
+ Type: R_MIPS_26
+ Addend: 0
+
+Symbols:
+ Local:
+ - Name: loc
+ Section: .text
+ - Name: .text
+ Type: STT_SECTION
+ Section: .text
+ Global:
+ - Name: glob
+ Section: .text
+ Value: 0x08
+ - Name: T1
+...
More information about the llvm-commits
mailing list