summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2014-06-14 12:55:03 +0000
committerSimon Atanasyan <simon@atanasyan.com>2014-06-14 12:55:03 +0000
commit4156ac2ecd803a54465ef796e9c45a56143b75c6 (patch)
treed639036a9fc2f77f98dc9aed9bd74396e53b11f5
parente2d6008d2e13a3265d0939d02d2c963c5b940704 (diff)
downloadbcm5719-llvm-4156ac2ecd803a54465ef796e9c45a56143b75c6.tar.gz
bcm5719-llvm-4156ac2ecd803a54465ef796e9c45a56143b75c6.zip
[Mips] Make exe-got.test test case independent from external input files.
llvm-svn: 210977
-rw-r--r--lld/test/elf/Mips/exe-got.test81
1 files changed, 69 insertions, 12 deletions
diff --git a/lld/test/elf/Mips/exe-got.test b/lld/test/elf/Mips/exe-got.test
index 23da3b8357f..ab2e9c29c4e 100644
--- a/lld/test/elf/Mips/exe-got.test
+++ b/lld/test/elf/Mips/exe-got.test
@@ -5,14 +5,14 @@
# entry in the local GOT section.
#
# 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=%t3 %s
+# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
# RUN: lld -flavor gnu -target mipsel -e glob \
-# RUN: --output-filetype=yaml -o %t4 %t3 %t-so
-# RUN: FileCheck -check-prefix=GOT %s < %t4
+# RUN: --output-filetype=yaml -o %t.exe %t-o.o %t.so
+# RUN: FileCheck -check-prefix=GOT %s < %t.exe
# GOT header
# GOT: - type: got
@@ -52,10 +52,67 @@
# GOT: offset: 0
# GOT: target: T1
- .abicalls
- .global glob
- .ent glob
-glob:
- lw $4,%call16(glob)($28)
- lw $4,%call16(T1)($28)
- .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: 0x08
+ - Name: .rel.text
+ Type: SHT_REL
+ Link: .symtab
+ AddressAlign: 0x04
+ Info: .text
+ Relocations:
+ - Offset: 0x00
+ Symbol: glob
+ Type: R_MIPS_CALL16
+ Addend: 0
+ - Offset: 0x04
+ Symbol: T1
+ Type: R_MIPS_CALL16
+ Addend: 0
+
+Symbols:
+ Local:
+ - Name: .text
+ Type: STT_SECTION
+ Section: .text
+ Global:
+ - Name: glob
+ Section: .text
+ - Name: T1
+...
OpenPOWER on IntegriCloud