diff options
author | Simon Atanasyan <simon@atanasyan.com> | 2014-06-09 13:45:58 +0000 |
---|---|---|
committer | Simon Atanasyan <simon@atanasyan.com> | 2014-06-09 13:45:58 +0000 |
commit | 1de1d63aec1e6e319ddc4928a0bdd2decc64e301 (patch) | |
tree | a02cefcb749e01a2e3eea8f9b32a3bbea9ffe9df | |
parent | dfbdc71ea1bf22c72422afa97948df90bc0a0eb2 (diff) | |
download | bcm5719-llvm-1de1d63aec1e6e319ddc4928a0bdd2decc64e301.tar.gz bcm5719-llvm-1de1d63aec1e6e319ddc4928a0bdd2decc64e301.zip |
[Mips] Make dt-textrel.test test case independent from external input files.
llvm-svn: 210469
-rw-r--r-- | lld/test/elf/Mips/dt-textrel.test | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/lld/test/elf/Mips/dt-textrel.test b/lld/test/elf/Mips/dt-textrel.test index 13cbea6e1dd..094f1797fb1 100644 --- a/lld/test/elf/Mips/dt-textrel.test +++ b/lld/test/elf/Mips/dt-textrel.test @@ -1,14 +1,40 @@ # Check that if a dynamic relocation modify a read-only section, # .dynamic section contains the DT_TEXTREL tag. -# 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 %t-exe %t-obj %t-so -# RUN: llvm-readobj -dynamic-table %t-exe | FileCheck %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-readobj -dynamic-table %t.exe | FileCheck %s # CHECK: 0x{{[0-9A-F]+}} TEXTREL +# 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: 0x04 + AddressAlign: 16 + Flags: [SHF_EXECINSTR, SHF_ALLOC] + +Symbols: + Global: + - Name: T1 + Section: .text + Type: STT_FUNC + Value: 0x0 + Size: 0x04 + +# o.o +--- FileHeader: Class: ELFCLASS32 Data: ELFDATA2LSB @@ -45,3 +71,4 @@ Symbols: Section: .text Size: 0x04 - Name: T1 +... |