using namespace lld::elf;
DefinedRegular *ElfSym::Bss;
-DefinedRegular *ElfSym::Etext;
+DefinedRegular *ElfSym::Etext1;
DefinedRegular *ElfSym::Etext2;
-DefinedRegular *ElfSym::Edata;
+DefinedRegular *ElfSym::Edata1;
DefinedRegular *ElfSym::Edata2;
-DefinedRegular *ElfSym::End;
+DefinedRegular *ElfSym::End1;
DefinedRegular *ElfSym::End2;
+DefinedRegular *ElfSym::MipsGp;
DefinedRegular *ElfSym::MipsGpDisp;
DefinedRegular *ElfSym::MipsLocalGp;
-DefinedRegular *ElfSym::MipsGp;
static uint64_t getSymVA(const SymbolBody &Body, int64_t &Addend) {
switch (Body.kind()) {
// Some linker-generated symbols need to be created as
// DefinedRegular symbols.
struct ElfSym {
- // The content for __bss_start symbol.
+ // __bss_start
static DefinedRegular *Bss;
- // The content for _etext and etext symbols.
- static DefinedRegular *Etext;
+ // etext and _etext
+ static DefinedRegular *Etext1;
static DefinedRegular *Etext2;
- // The content for _edata and edata symbols.
- static DefinedRegular *Edata;
+ // edata and _edata
+ static DefinedRegular *Edata1;
static DefinedRegular *Edata2;
- // The content for _end and end symbols.
- static DefinedRegular *End;
+ // end and _end
+ static DefinedRegular *End1;
static DefinedRegular *End2;
- // The content for _gp_disp/__gnu_local_gp symbols for MIPS target.
+ // _gp, _gp_disp and __gnu_local_gp symbols. Only for MIPS.
+ static DefinedRegular *MipsGp;
static DefinedRegular *MipsGpDisp;
static DefinedRegular *MipsLocalGp;
- static DefinedRegular *MipsGp;
};
// A real symbol object, SymbolBody, is usually stored within a Symbol. There's
};
ElfSym::Bss = Add("__bss_start");
- ElfSym::End = Add("_end");
- ElfSym::End2 = Add("end");
- ElfSym::Etext = Add("_etext");
- ElfSym::Etext2 = Add("etext");
- ElfSym::Edata = Add("_edata");
- ElfSym::Edata2 = Add("edata");
+ ElfSym::End1 = Add("end");
+ ElfSym::End2 = Add("_end");
+ ElfSym::Etext1 = Add("etext");
+ ElfSym::Etext2 = Add("_etext");
+ ElfSym::Edata1 = Add("edata");
+ ElfSym::Edata2 = Add("_edata");
}
// Sort input sections by section name suffixes for
LastRO = &P;
}
if (Last)
- Set(ElfSym::End, ElfSym::End2, Last->First, Last->p_memsz);
+ Set(ElfSym::End1, ElfSym::End2, Last->First, Last->p_memsz);
if (LastRO)
- Set(ElfSym::Etext, ElfSym::Etext2, LastRO->First, LastRO->p_filesz);
+ Set(ElfSym::Etext1, ElfSym::Etext2, LastRO->First, LastRO->p_filesz);
if (LastRW)
- Set(ElfSym::Edata, ElfSym::Edata2, LastRW->First, LastRW->p_filesz);
+ Set(ElfSym::Edata1, ElfSym::Edata2, LastRW->First, LastRW->p_filesz);
if (ElfSym::Bss)
ElfSym::Bss->Section = findSection(".bss");