Files
clang-p2996/lld/test/elf/Mips/exe-dynamic.test
Shankar Easwaran babba413f5 [ELF] Fix alignment for dynamic relocation sections.
The sections .rela/.rel.(*) have a alignment of 2 in the final image created by
the linker. This needs to be properly set to the right alignment depending on
the architecture(32/64bits).

llvm-svn: 201740
2014-02-19 23:46:08 +00:00

50 lines
1.9 KiB
Plaintext

# Check MIPS specific tags in the dynamic table in case executable linking.
# Build shared library
# RUN: llvm-mc -triple=mipsel -filetype=obj -relocation-model=pic \
# RUN: -o=%t-obj %p/Inputs/ext.s
# RUN: lld -flavor gnu -target mipsel -shared -o %t-so %t-obj
# Build executable
# RUN: llvm-mc -triple=mipsel -filetype=obj -o=%t-obj %s
# RUN: lld -flavor gnu -target mipsel -e glob -o %t-exe %t-obj %t-so
# RUN: llvm-readobj -dynamic-table %t-exe | FileCheck %s
# CHECK: Format: ELF32-mips
# CHECK: Arch: mipsel
# CHECK: AddressSize: 32bit
# CHECK: LoadName:
# CHECK: DynamicSection [ (20 entries)
# CHECK: Tag Type Name/Value
# CHECK-NEXT: 0x00000004 HASH 0x400110
# CHECK-NEXT: 0x00000005 STRTAB 0x400144
# CHECK-NEXT: 0x00000006 SYMTAB 0x400124
# CHECK-NEXT: 0x0000000A STRSZ 30 (bytes)
# CHECK-NEXT: 0x0000000B SYMENT 16 (bytes)
# CHECK-NEXT: 0x0000001A FINI_ARRAY 0x0
# CHECK-NEXT: 0x0000001C FINI_ARRAYSZ 0 (bytes)
# CHECK-NEXT: 0x00000002 PLTRELSZ 8 (bytes)
# CHECK-NEXT: 0x70000032 MIPS_PLTGOT 0x402000
# CHECK-NEXT: 0x00000014 PLTREL REL
# CHECK-NEXT: 0x00000017 JMPREL 0x400164
# CHECK-NEXT: 0x70000001 MIPS_RLD_VERSION 1
# CHECK-NEXT: 0x70000005 MIPS_FLAGS 0x2
# CHECK-NEXT: 0x70000006 MIPS_BASE_ADDRESS 0x400000
# CHECK-NEXT: 0x7000000A MIPS_LOCAL_GOTNO 2
# CHECK-NEXT: 0x70000011 MIPS_SYMTABNO 2
# CHECK-NEXT: 0x70000013 MIPS_GOTSYM 0x2
# CHECK-NEXT: 0x00000003 PLTGOT 0x401000
# CHECK-NEXT: 0x00000001 NEEDED SharedLibrary (exe-dynamic.test.{{.*}})
# CHECK-NEXT: 0x00000000 NULL 0x0
# CHECK-NEXT: ]
.abicalls
.global glob
.ent glob
loc:
jal ext1
glob:
jal loc
jal glob
.end glob