// debug. What's a solution? Instead of exporting a varaible V from a DSO,
// define an accessor getV().
template <class ELFT> static void addCopyRelSymbol(SharedSymbol *SS) {
- typedef typename ELFT::uint uintX_t;
-
// Copy relocation against zero-sized symbol doesn't make sense.
- uintX_t SymSize = SS->template getSize<ELFT>();
+ uint64_t SymSize = SS->template getSize<ELFT>();
if (SymSize == 0)
fatal("cannot create a copy relocation for symbol " + toString(*SS));
// memory protection by reserving space in the .bss.rel.ro section.
bool IsReadOnly = isReadOnly<ELFT>(SS);
BssSection *Sec = IsReadOnly ? In<ELFT>::BssRelRo : In<ELFT>::Bss;
- uintX_t Off = Sec->reserveSpace(SymSize, SS->getAlignment<ELFT>());
+ uint64_t Off = Sec->reserveSpace(SymSize, SS->getAlignment<ELFT>());
// Look through the DSO's dynamic symbol table for aliases and create a
// dynamic symbol for each one. This causes the copy relocation to correctly
// CopyRelSec and CopyRelSecOff are significant only when NeedsCopy is true.
InputSection *CopyRelSec;
- size_t CopyRelSecOff;
+ uint64_t CopyRelSecOff;
private:
template <class ELFT> const typename ELFT::Sym &getSym() const {
BssSection::BssSection(StringRef Name)
: SyntheticSection(SHF_ALLOC | SHF_WRITE, SHT_NOBITS, 0, Name) {}
-size_t BssSection::reserveSpace(size_t Size, uint32_t Alignment) {
+size_t BssSection::reserveSpace(uint64_t Size, uint32_t Alignment) {
if (OutSec)
OutSec->updateAlignment(Alignment);
this->Size = alignTo(this->Size, Alignment) + Size;
- this->Alignment = std::max<uint32_t>(this->Alignment, Alignment);
+ this->Alignment = std::max(this->Alignment, Alignment);
return this->Size - Size;
}