summaryrefslogtreecommitdiffstats
path: root/lld/ELF/LinkerScript.cpp
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2017-03-14 10:00:19 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2017-03-14 10:00:19 +0000
commit0c1c8085bc16bdba13484b2c52085f66bb9c884e (patch)
treef415ea3707f8391331f74603f574e864a055ab50 /lld/ELF/LinkerScript.cpp
parent72e3fa7e2c443e5b97fe91d142e43a02b466c9af (diff)
downloadbcm5719-llvm-0c1c8085bc16bdba13484b2c52085f66bb9c884e.tar.gz
bcm5719-llvm-0c1c8085bc16bdba13484b2c52085f66bb9c884e.zip
[ELF] - Move ThreadBssOffset and Dot to LinkerScriptBase. NFC.
One more step to combine LinkerScript and LinkerScriptBase. llvm-svn: 297722
Diffstat (limited to 'lld/ELF/LinkerScript.cpp')
-rw-r--r--lld/ELF/LinkerScript.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 4ee9e1ba374..7da00fa4224 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -81,7 +81,7 @@ static bool isUnderSysroot(StringRef Path) {
template <class ELFT>
void LinkerScript<ELFT>::setDot(Expr E, const Twine &Loc, bool InSec) {
- uintX_t Val = E();
+ uint64_t Val = E();
if (Val < Dot) {
if (InSec)
error(Loc + ": unable to move location counter backward for: " +
@@ -398,7 +398,7 @@ template <class ELFT> void LinkerScript<ELFT>::output(InputSection *S) {
return;
bool IsTbss = isTbss<ELFT>(CurOutSec);
- uintX_t Pos = IsTbss ? Dot + ThreadBssOffset : Dot;
+ uint64_t Pos = IsTbss ? Dot + ThreadBssOffset : Dot;
Pos = alignTo(Pos, S->Alignment);
S->OutSecOff = Pos - CurOutSec->Addr;
Pos += S->getSize();
@@ -555,7 +555,7 @@ void LinkerScript<ELFT>::assignOffsets(OutputSectionCommand *Cmd) {
setDot(Cmd->AddrExpr, Cmd->Location);
if (Cmd->LMAExpr) {
- uintX_t D = Dot;
+ uint64_t D = Dot;
LMAOffset = [=] { return Cmd->LMAExpr() - D; };
}
@@ -612,7 +612,7 @@ template <class ELFT> void LinkerScript<ELFT>::adjustSectionsBeforeSorting() {
// corresponding output section. The bfd linker seems to only create them if
// '.' is assigned to, but creating these section should not have any bad
// consequeces and gives us a section to put the symbol in.
- uintX_t Flags = SHF_ALLOC;
+ uint64_t Flags = SHF_ALLOC;
uint32_t Type = SHT_NOBITS;
for (const std::unique_ptr<BaseCommand> &Base : Opt.Commands) {
auto *Cmd = dyn_cast<OutputSectionCommand>(Base.get());
@@ -784,7 +784,7 @@ void LinkerScript<ELFT>::assignAddresses(std::vector<PhdrEntry> &Phdrs) {
assignOffsets(Cmd);
}
- uintX_t MinVA = std::numeric_limits<uintX_t>::max();
+ uint64_t MinVA = std::numeric_limits<uint64_t>::max();
for (OutputSection *Sec : *OutputSections) {
if (Sec->Flags & SHF_ALLOC)
MinVA = std::min<uint64_t>(MinVA, Sec->Addr);
OpenPOWER on IntegriCloud