From: Simon Atanasyan Date: Sat, 2 Aug 2014 20:18:31 +0000 (+0000) Subject: [Mips] Replace assembler code by YAML to make the 'gotsym.test' test X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0670abdd2e712b6a5c3402cb2245ec305aa4431b;p=platform%2Fupstream%2Fllvm.git [Mips] Replace assembler code by YAML to make the 'gotsym.test' test target independent. llvm-svn: 214641 --- diff --git a/lld/test/elf/Mips/gotsym.test b/lld/test/elf/Mips/gotsym.test index 651d73f..4581901 100644 --- a/lld/test/elf/Mips/gotsym.test +++ b/lld/test/elf/Mips/gotsym.test @@ -1,10 +1,8 @@ -# REQUIRES: mips - # Check _gp_disp and GOT_OFFSET_TABLE value -# RUN: llvm-mc -triple=mipsel -filetype=obj -o=%t1 %s - -# RUN: lld -flavor gnu -target mipsel -shared --noinhibit-exec -o %t2 %t1 -# RUN: llvm-objdump -section-headers -t %t2 | FileCheck -check-prefix=SHARED %s +# +# RUN: yaml2obj -format=elf %s > %t.o +# RUN: lld -flavor gnu -target mipsel -shared --noinhibit-exec -o %t.so %t.o +# RUN: llvm-objdump -h -t %t.so | FileCheck -check-prefix=SHARED %s # SHARED: Sections: # SHARED: Idx Name Size Address Type @@ -14,8 +12,8 @@ # SHARED: 00008ff0 g *ABS* 00000000 _gp # SHARED: 00008ff0 g *ABS* 00000000 _gp_disp -# RUN: lld -flavor gnu -target mipsel -e main --noinhibit-exec -o %t2 %t1 -# RUN: llvm-objdump -section-headers -t %t2 | FileCheck -check-prefix=EXE %s +# RUN: lld -flavor gnu -target mipsel -e main --noinhibit-exec -o %t.exe %t.o +# RUN: llvm-objdump -h -t %t.exe | FileCheck -check-prefix=EXE %s # EXE: Sections: # EXE: Idx Name Size Address Type @@ -25,8 +23,21 @@ # EXE: 00408ff0 g *ABS* 00000000 _gp # EXE: 00408ff0 g *ABS* 00000000 _gp_disp - .global main - .ent main -main: - nop - .end main +FileHeader: + Class: ELFCLASS32 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_MIPS + Flags: [ EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32 ] + +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + AddressAlign: 0x10 + Size: 0x04 + +Symbols: + Global: + - Name: main + Section: .text