[lld] r213390 - [Mips] Replace assembler code by YAML to make the test 'base-address.test'
Simon Atanasyan
simon at atanasyan.com
Fri Jul 18 10:23:21 PDT 2014
Author: atanasyan
Date: Fri Jul 18 12:23:21 2014
New Revision: 213390
URL: http://llvm.org/viewvc/llvm-project?rev=213390&view=rev
Log:
[Mips] Replace assembler code by YAML to make the test 'base-address.test'
target independent.
Modified:
lld/trunk/test/elf/Mips/base-address.test
Modified: lld/trunk/test/elf/Mips/base-address.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/base-address.test?rev=213390&r1=213389&r2=213390&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/base-address.test (original)
+++ lld/trunk/test/elf/Mips/base-address.test Fri Jul 18 12:23:21 2014
@@ -1,11 +1,9 @@
-# REQUIRES: mips
-
# Check executable base address configuration. Base address should be
# equal to 0x400000 and the MIPS_BASE_ADDRESS dynamic tag's value should
# be the same.
-# RUN: llvm-mc -triple=mipsel -filetype=obj -o=%t1 %s
-# RUN: lld -flavor gnu -target mipsel --noinhibit-exec -o %t2 %t1
-# RUN: llvm-readobj -dynamic-table -program-headers %t2 | FileCheck %s
+# RUN: yaml2obj -format=elf %s > %t.o
+# RUN: lld -flavor gnu -target mipsel --noinhibit-exec -o %t.exe %t.o
+# RUN: llvm-readobj -dynamic-table -program-headers %t.exe | FileCheck %s
# CHECK: DynamicSection [ (15 entries)
# CHECK: Tag Type Name/Value
@@ -34,7 +32,7 @@
# CHECK: }
# CHECK: ProgramHeader {
# CHECK: Type: PT_INTERP (0x3)
-# CHECK: Offset: 0x100
+# CHECK: Offset: 0xF4
# CHECK: VirtualAddress: 0x{{[0-9A-F]+}}
# CHECK: }
# CHECK: ProgramHeader {
@@ -54,14 +52,60 @@
# CHECK: }
# CHECK: ProgramHeader {
# CHECK: Type: PT_DYNAMIC (0x2)
-# CHECK: Offset: 0x144
+# CHECK: Offset: 0x12C
# CHECK: VirtualAddress: 0x{{[0-9A-F]+}}
# CHECK: }
# CHECK: ]
- .global main
- .ent main
-main:
- nop
- .end main
-
+FileHeader:
+ Class: ELFCLASS32
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_MIPS
+ Flags: [ EF_MIPS_ABI_O32, EF_MIPS_ARCH_32 ]
+Sections:
+ - Name: .text
+ Type: SHT_PROGBITS
+ Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
+ AddressAlign: 0x04
+ Size: 0x04
+ - Name: .data
+ Type: SHT_PROGBITS
+ Flags: [ SHF_WRITE, SHF_ALLOC ]
+ AddressAlign: 0x04
+ Size: 0x00
+ - Name: .bss
+ Type: SHT_NOBITS
+ Flags: [ SHF_WRITE, SHF_ALLOC ]
+ AddressAlign: 0x04
+ Size: 0x00
+ - Name: .reginfo
+ Type: SHT_MIPS_REGINFO
+ Flags: [ SHF_ALLOC ]
+ AddressAlign: 0x01
+ Size: 0x18
+ - Name: .MIPS.abiflags
+ Type: SHT_MIPS_ABIFLAGS
+ Flags: [ SHF_ALLOC ]
+ AddressAlign: 0x08
+ Content: '000020010101000100000000000000000000000000000000'
+Symbols:
+ Local:
+ - Name: .text
+ Type: STT_SECTION
+ Section: .text
+ - Name: .data
+ Type: STT_SECTION
+ Section: .data
+ - Name: .bss
+ Type: STT_SECTION
+ Section: .bss
+ - Name: .reginfo
+ Type: STT_SECTION
+ Section: .reginfo
+ - Name: .MIPS.abiflags
+ Type: STT_SECTION
+ Section: .MIPS.abiflags
+ Global:
+ - Name: main
+ Section: .text
More information about the llvm-commits
mailing list