[Mips] Provide default name of MIPS-specific interpreter.

llvm-svn: 199514
This commit is contained in:
Simon Atanasyan 2014-01-17 21:18:14 +00:00
parent 1121de36c2
commit 80b86a43d5
5 changed files with 24 additions and 6 deletions

View File

@ -46,6 +46,10 @@ StringRef MipsLinkingContext::entrySymbolName() const {
return _entrySymbolName;
}
StringRef MipsLinkingContext::getDefaultInterpreter() const {
return "/lib/ld.so.1";
}
void MipsLinkingContext::addPasses(PassManager &pm) {
auto pass = createMipsRelocationPass(*this);
if (pass)

View File

@ -37,6 +37,7 @@ public:
virtual bool isLittleEndian() const;
virtual uint64_t getBaseAddress() const;
virtual StringRef entrySymbolName() const;
virtual StringRef getDefaultInterpreter() const;
virtual void addPasses(PassManager &pm);
};

View File

@ -7,9 +7,9 @@
# CHECK: DynamicSection [ (15 entries)
# CHECK: Tag Type Name/Value
# CHECK: 0x00000004 HASH 0x400110
# CHECK: 0x00000005 STRTAB 0x400130
# CHECK: 0x00000006 SYMTAB 0x400120
# CHECK: 0x00000004 HASH 0x400104
# CHECK: 0x00000005 STRTAB 0x400124
# CHECK: 0x00000006 SYMTAB 0x400114
# CHECK: 0x0000000A STRSZ 1 (bytes)
# CHECK: 0x0000000B SYMENT 16 (bytes)
# CHECK: 0x0000001A FINI_ARRAY 0x0
@ -52,8 +52,8 @@
# CHECK: }
# CHECK: ProgramHeader {
# CHECK: Type: PT_DYNAMIC (0x2)
# CHECK: Offset: 0x138
# CHECK: VirtualAddress: 0x400138
# CHECK: Offset: 0x12C
# CHECK: VirtualAddress: 0x40012C
# CHECK: }
# CHECK: ]

View File

@ -4,7 +4,7 @@
# RUN: llvm-objdump -t %t2 | FileCheck %s
# CHECK: SYMBOL TABLE:
# CHECK: 00400134 g F .text 00000004 main
# CHECK: 00400128 g F .text 00000004 main
# CHECK: 00000000 *UND* 00000000 __start
.global main

View File

@ -0,0 +1,13 @@
# Check program interpreter setup.
# RUN: llvm-mc -triple=mipsel -filetype=obj -o=%t1 %s
# RUN: lld -flavor gnu -target mipsel -e main -o %t2 %t1
# RUN: llvm-objdump -s %t2 | FileCheck %s
# CHECK: Contents of section .interp:
# CHECK-NEXT: 4000f4 2f6c6962 2f6c642e 736f2e31 00 /lib/ld.so.1.
.global main
.ent main
main:
nop
.end main