unsigned getStubAlignment() override { return 1; }
- Expected<relocation_iterator>
+ Expected<object::relocation_iterator>
processRelocationRef(unsigned SectionID,
- relocation_iterator RelI,
- const ObjectFile &Obj,
+ object::relocation_iterator RelI,
+ const object::ObjectFile &Obj,
ObjSectionToIDMap &ObjSectionToID,
StubMap &Stubs) override {
namespace llvm {
-static bool isThumbFunc(symbol_iterator Symbol, const ObjectFile &Obj,
- section_iterator Section) {
- Expected<SymbolRef::Type> SymTypeOrErr = Symbol->getType();
+static bool isThumbFunc(object::symbol_iterator Symbol,
+ const object::ObjectFile &Obj,
+ object::section_iterator Section) {
+ Expected<object::SymbolRef::Type> SymTypeOrErr = Symbol->getType();
if (!SymTypeOrErr) {
std::string Buf;
raw_string_ostream OS(Buf);
report_fatal_error(Buf);
}
- if (*SymTypeOrErr != SymbolRef::ST_Function)
+ if (*SymTypeOrErr != object::SymbolRef::ST_Function)
return false;
// We check the IMAGE_SCN_MEM_16BIT flag in the section of the symbol to tell
// if it's thumb or not
- return cast<COFFObjectFile>(Obj).getCOFFSection(*Section)->Characteristics &
+ return cast<object::COFFObjectFile>(Obj)
+ .getCOFFSection(*Section)
+ ->Characteristics &
COFF::IMAGE_SCN_MEM_16BIT;
}
unsigned getStubAlignment() override { return 1; }
- Expected<relocation_iterator>
+ Expected<object::relocation_iterator>
processRelocationRef(unsigned SectionID,
- relocation_iterator RelI,
- const ObjectFile &Obj,
+ object::relocation_iterator RelI,
+ const object::ObjectFile &Obj,
ObjSectionToIDMap &ObjSectionToID,
StubMap &Stubs) override {
auto Symbol = RelI->getSymbol();
return std::make_tuple(Offset, RelType, Addend);
}
- Expected<relocation_iterator>
+ Expected<object::relocation_iterator>
processRelocationRef(unsigned SectionID,
- relocation_iterator RelI,
- const ObjectFile &Obj,
+ object::relocation_iterator RelI,
+ const object::ObjectFile &Obj,
ObjSectionToIDMap &ObjSectionToID,
StubMap &Stubs) override {
// If possible, find the symbol referred to in the relocation,
// and the section that contains it.
- symbol_iterator Symbol = RelI->getSymbol();
+ object::symbol_iterator Symbol = RelI->getSymbol();
if (Symbol == Obj.symbol_end())
report_fatal_error("Unknown symbol in relocation");
auto SectionOrError = Symbol->getSection();
if (!SectionOrError)
return SectionOrError.takeError();
- section_iterator SecI = *SectionOrError;
+ object::section_iterator SecI = *SectionOrError;
// If there is no section, this must be an external reference.
const bool IsExtern = SecI == Obj.section_end();
UnregisteredEHFrameSections.clear();
}
- Error finalizeLoad(const ObjectFile &Obj,
+ Error finalizeLoad(const object::ObjectFile &Obj,
ObjSectionToIDMap &SectionMap) override {
// Look for and record the EH frame section IDs.
for (const auto &SectionPair : SectionMap) {
- const SectionRef &Section = SectionPair.first;
+ const object::SectionRef &Section = SectionPair.first;
StringRef Name;
if (auto EC = Section.getName(Name))
return errorCodeToError(EC);