[lld] r211099 - [Mips] Make plt-header.test test case independent from external input files.
Simon Atanasyan
simon at atanasyan.com
Tue Jun 17 06:08:11 PDT 2014
Author: atanasyan
Date: Tue Jun 17 08:08:11 2014
New Revision: 211099
URL: http://llvm.org/viewvc/llvm-project?rev=211099&view=rev
Log:
[Mips] Make plt-header.test test case independent from external input files.
Modified:
lld/trunk/test/elf/Mips/plt-header.test
Modified: lld/trunk/test/elf/Mips/plt-header.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/plt-header.test?rev=211099&r1=211098&r2=211099&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/plt-header.test (original)
+++ lld/trunk/test/elf/Mips/plt-header.test Tue Jun 17 08:08:11 2014
@@ -3,13 +3,13 @@
# Check initialization of .plt header entries.
# Build shared library
-# RUN: yaml2obj -format=elf %S/Inputs/pic-obj.yaml > %t-obj
-# RUN: lld -flavor gnu -target mipsel -shared -o %t-so %t-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=%t3 %s
-# RUN: lld -flavor gnu -target mipsel -e glob -o %t4 %t3 %t-so
-# RUN: llvm-objdump -section-headers -disassemble %t4 | \
+# 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-objdump -section-headers -disassemble %t.exe | \
# RUN: FileCheck -check-prefix=EXE %s
# EXE: Disassembly of section .plt:
@@ -29,13 +29,71 @@
# EXE: 6 .plt 00000030 0000000000400170 TEXT DATA
# EXE: 10 .got.plt 0000000c 0000000000402000 DATA
- .abicalls
- .global glob
- .ent glob
-glob:
- jal $t9
- jal loc
-loc:
- jal glob
- jal T1
- .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
+ Size: 0x20
+ - Name: .rel.text
+ Type: SHT_REL
+ Link: .symtab
+ AddressAlign: 0x04
+ Info: .text
+ Relocations:
+ - Offset: 0x08
+ Symbol: .text
+ Type: R_MIPS_26
+ - Offset: 0x10
+ Symbol: glob
+ Type: R_MIPS_26
+ - Offset: 0x18
+ Symbol: T1
+ Type: R_MIPS_26
+
+Symbols:
+ Local:
+ - Name: loc
+ Section: .text
+ Value: 0x10
+ - Name: .text
+ Type: STT_SECTION
+ Section: .text
+ Global:
+ - Name: glob
+ Section: .text
+ - Name: T1
+...
More information about the llvm-commits
mailing list