blob: 9a1804f808a71c7b4b4e9d5fd634af654f7e4f70 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
//===- MipsGNUInfo.cpp ----------------------------------------------------===//
//
// The MCLinker Project
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "MipsGNUInfo.h"
namespace mcld {
//===----------------------------------------------------------------------===//
// MipsGNUInfo
//===----------------------------------------------------------------------===//
MipsGNUInfo::MipsGNUInfo(const llvm::Triple& pTriple)
: GNUInfo(pTriple), m_ABIVersion(0), m_ElfFlags(0) {
}
void MipsGNUInfo::setABIVersion(uint8_t ver) {
m_ABIVersion = ver;
}
void MipsGNUInfo::setElfFlags(uint64_t flags) {
m_ElfFlags = flags;
}
uint32_t MipsGNUInfo::machine() const {
return llvm::ELF::EM_MIPS;
}
uint8_t MipsGNUInfo::ABIVersion() const {
return m_ABIVersion;
}
uint64_t MipsGNUInfo::defaultTextSegmentAddr() const {
if (m_Triple.isArch32Bit())
return 0x400000;
else
return 0x120000000ull;
}
uint64_t MipsGNUInfo::flags() const {
return m_ElfFlags;
}
const char* MipsGNUInfo::entry() const {
return "__start";
}
const char* MipsGNUInfo::dyld() const {
return m_Triple.isArch32Bit() ? "/lib/ld.so.1" : "/lib64/ld.so.1";
}
uint64_t MipsGNUInfo::abiPageSize() const {
return 0x10000;
}
} // namespace mcld
|