From c97126b1c967d4bc82246b6cc27b312040bd8e6c Mon Sep 17 00:00:00 2001 From: Simon Atanasyan Date: Fri, 11 Jul 2014 13:42:04 +0000 Subject: [PATCH] [Mips] Make rel-dynamic-11.test test case independent from external input files. llvm-svn: 212813 --- lld/test/elf/Mips/rel-dynamic-11.test | 44 ++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/lld/test/elf/Mips/rel-dynamic-11.test b/lld/test/elf/Mips/rel-dynamic-11.test index 7ef444b..aaa7b41 100644 --- a/lld/test/elf/Mips/rel-dynamic-11.test +++ b/lld/test/elf/Mips/rel-dynamic-11.test @@ -5,11 +5,11 @@ # a) Emitting R_MIPS_REL32 relocations for both symbols. # b) There should be no PLT entries. # -# 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 -shared -o %t2-so %t-obj %t-so -# RUN: llvm-readobj -dt -r -s %t2-so | FileCheck -check-prefix=PLT-SYM %s +# RUN: yaml2obj -format=elf -docnum 1 %s > %t-so.o +# RUN: lld -flavor gnu -target mipsel -shared -o %t1.so %t-so.o +# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o +# RUN: lld -flavor gnu -target mipsel -shared -o %t2.so %t-o.o %t1.so +# RUN: llvm-readobj -dt -r -s %t2.so | FileCheck -check-prefix=PLT-SYM %s # PLT-SYM: Sections [ # PLT-SYM: Section { @@ -30,8 +30,33 @@ # PLT-SYM-NEXT: Other: 0 # PLT-SYM-NEXT: Section: Undefined (0x0) -!ELF -FileHeader: !FileHeader +# 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 @@ -41,13 +66,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] @@ -82,3 +107,4 @@ Symbols: Type: STT_OBJECT Value: 0x0 Size: 8 +... -- 2.7.4