mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-12 16:25:18 +00:00
Add a constructor for DataRefImpl and remove excess initialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154371 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -290,9 +290,7 @@ class DynRefImpl {
|
|||||||
const OwningType *OwningObject;
|
const OwningType *OwningObject;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DynRefImpl() : OwningObject(NULL) {
|
DynRefImpl() : OwningObject(NULL) { }
|
||||||
std::memset(&DynPimpl, 0, sizeof(DynPimpl));
|
|
||||||
}
|
|
||||||
|
|
||||||
DynRefImpl(DataRefImpl DynP, const OwningType *Owner);
|
DynRefImpl(DataRefImpl DynP, const OwningType *Owner);
|
||||||
|
|
||||||
@@ -1108,7 +1106,6 @@ template<support::endianness target_endianness, bool is64Bits>
|
|||||||
relocation_iterator ELFObjectFile<target_endianness, is64Bits>
|
relocation_iterator ELFObjectFile<target_endianness, is64Bits>
|
||||||
::getSectionRelBegin(DataRefImpl Sec) const {
|
::getSectionRelBegin(DataRefImpl Sec) const {
|
||||||
DataRefImpl RelData;
|
DataRefImpl RelData;
|
||||||
memset(&RelData, 0, sizeof(RelData));
|
|
||||||
const Elf_Shdr *sec = reinterpret_cast<const Elf_Shdr *>(Sec.p);
|
const Elf_Shdr *sec = reinterpret_cast<const Elf_Shdr *>(Sec.p);
|
||||||
typename RelocMap_t::const_iterator ittr = SectionRelocMap.find(sec);
|
typename RelocMap_t::const_iterator ittr = SectionRelocMap.find(sec);
|
||||||
if (sec != 0 && ittr != SectionRelocMap.end()) {
|
if (sec != 0 && ittr != SectionRelocMap.end()) {
|
||||||
@@ -1123,7 +1120,6 @@ template<support::endianness target_endianness, bool is64Bits>
|
|||||||
relocation_iterator ELFObjectFile<target_endianness, is64Bits>
|
relocation_iterator ELFObjectFile<target_endianness, is64Bits>
|
||||||
::getSectionRelEnd(DataRefImpl Sec) const {
|
::getSectionRelEnd(DataRefImpl Sec) const {
|
||||||
DataRefImpl RelData;
|
DataRefImpl RelData;
|
||||||
memset(&RelData, 0, sizeof(RelData));
|
|
||||||
const Elf_Shdr *sec = reinterpret_cast<const Elf_Shdr *>(Sec.p);
|
const Elf_Shdr *sec = reinterpret_cast<const Elf_Shdr *>(Sec.p);
|
||||||
typename RelocMap_t::const_iterator ittr = SectionRelocMap.find(sec);
|
typename RelocMap_t::const_iterator ittr = SectionRelocMap.find(sec);
|
||||||
if (sec != 0 && ittr != SectionRelocMap.end()) {
|
if (sec != 0 && ittr != SectionRelocMap.end()) {
|
||||||
@@ -1626,7 +1622,6 @@ template<support::endianness target_endianness, bool is64Bits>
|
|||||||
symbol_iterator ELFObjectFile<target_endianness, is64Bits>
|
symbol_iterator ELFObjectFile<target_endianness, is64Bits>
|
||||||
::begin_symbols() const {
|
::begin_symbols() const {
|
||||||
DataRefImpl SymbolData;
|
DataRefImpl SymbolData;
|
||||||
memset(&SymbolData, 0, sizeof(SymbolData));
|
|
||||||
if (SymbolTableSections.size() <= 1) {
|
if (SymbolTableSections.size() <= 1) {
|
||||||
SymbolData.d.a = std::numeric_limits<uint32_t>::max();
|
SymbolData.d.a = std::numeric_limits<uint32_t>::max();
|
||||||
SymbolData.d.b = std::numeric_limits<uint32_t>::max();
|
SymbolData.d.b = std::numeric_limits<uint32_t>::max();
|
||||||
@@ -1641,7 +1636,6 @@ template<support::endianness target_endianness, bool is64Bits>
|
|||||||
symbol_iterator ELFObjectFile<target_endianness, is64Bits>
|
symbol_iterator ELFObjectFile<target_endianness, is64Bits>
|
||||||
::end_symbols() const {
|
::end_symbols() const {
|
||||||
DataRefImpl SymbolData;
|
DataRefImpl SymbolData;
|
||||||
memset(&SymbolData, 0, sizeof(SymbolData));
|
|
||||||
SymbolData.d.a = std::numeric_limits<uint32_t>::max();
|
SymbolData.d.a = std::numeric_limits<uint32_t>::max();
|
||||||
SymbolData.d.b = std::numeric_limits<uint32_t>::max();
|
SymbolData.d.b = std::numeric_limits<uint32_t>::max();
|
||||||
return symbol_iterator(SymbolRef(SymbolData, this));
|
return symbol_iterator(SymbolRef(SymbolData, this));
|
||||||
@@ -1651,7 +1645,6 @@ template<support::endianness target_endianness, bool is64Bits>
|
|||||||
symbol_iterator ELFObjectFile<target_endianness, is64Bits>
|
symbol_iterator ELFObjectFile<target_endianness, is64Bits>
|
||||||
::begin_dynamic_symbols() const {
|
::begin_dynamic_symbols() const {
|
||||||
DataRefImpl SymbolData;
|
DataRefImpl SymbolData;
|
||||||
memset(&SymbolData, 0, sizeof(SymbolData));
|
|
||||||
if (SymbolTableSections[0] == NULL) {
|
if (SymbolTableSections[0] == NULL) {
|
||||||
SymbolData.d.a = std::numeric_limits<uint32_t>::max();
|
SymbolData.d.a = std::numeric_limits<uint32_t>::max();
|
||||||
SymbolData.d.b = std::numeric_limits<uint32_t>::max();
|
SymbolData.d.b = std::numeric_limits<uint32_t>::max();
|
||||||
@@ -1666,7 +1659,6 @@ template<support::endianness target_endianness, bool is64Bits>
|
|||||||
symbol_iterator ELFObjectFile<target_endianness, is64Bits>
|
symbol_iterator ELFObjectFile<target_endianness, is64Bits>
|
||||||
::end_dynamic_symbols() const {
|
::end_dynamic_symbols() const {
|
||||||
DataRefImpl SymbolData;
|
DataRefImpl SymbolData;
|
||||||
memset(&SymbolData, 0, sizeof(SymbolData));
|
|
||||||
SymbolData.d.a = std::numeric_limits<uint32_t>::max();
|
SymbolData.d.a = std::numeric_limits<uint32_t>::max();
|
||||||
SymbolData.d.b = std::numeric_limits<uint32_t>::max();
|
SymbolData.d.b = std::numeric_limits<uint32_t>::max();
|
||||||
return symbol_iterator(SymbolRef(SymbolData, this));
|
return symbol_iterator(SymbolRef(SymbolData, this));
|
||||||
@@ -1676,7 +1668,6 @@ template<support::endianness target_endianness, bool is64Bits>
|
|||||||
section_iterator ELFObjectFile<target_endianness, is64Bits>
|
section_iterator ELFObjectFile<target_endianness, is64Bits>
|
||||||
::begin_sections() const {
|
::begin_sections() const {
|
||||||
DataRefImpl ret;
|
DataRefImpl ret;
|
||||||
memset(&ret, 0, sizeof(DataRefImpl));
|
|
||||||
ret.p = reinterpret_cast<intptr_t>(base() + Header->e_shoff);
|
ret.p = reinterpret_cast<intptr_t>(base() + Header->e_shoff);
|
||||||
return section_iterator(SectionRef(ret, this));
|
return section_iterator(SectionRef(ret, this));
|
||||||
}
|
}
|
||||||
@@ -1685,7 +1676,6 @@ template<support::endianness target_endianness, bool is64Bits>
|
|||||||
section_iterator ELFObjectFile<target_endianness, is64Bits>
|
section_iterator ELFObjectFile<target_endianness, is64Bits>
|
||||||
::end_sections() const {
|
::end_sections() const {
|
||||||
DataRefImpl ret;
|
DataRefImpl ret;
|
||||||
memset(&ret, 0, sizeof(DataRefImpl));
|
|
||||||
ret.p = reinterpret_cast<intptr_t>(base()
|
ret.p = reinterpret_cast<intptr_t>(base()
|
||||||
+ Header->e_shoff
|
+ Header->e_shoff
|
||||||
+ (Header->e_shentsize*getNumSections()));
|
+ (Header->e_shentsize*getNumSections()));
|
||||||
@@ -1696,7 +1686,6 @@ template<support::endianness target_endianness, bool is64Bits>
|
|||||||
typename ELFObjectFile<target_endianness, is64Bits>::dyn_iterator
|
typename ELFObjectFile<target_endianness, is64Bits>::dyn_iterator
|
||||||
ELFObjectFile<target_endianness, is64Bits>::begin_dynamic_table() const {
|
ELFObjectFile<target_endianness, is64Bits>::begin_dynamic_table() const {
|
||||||
DataRefImpl DynData;
|
DataRefImpl DynData;
|
||||||
memset(&DynData, 0, sizeof(DynData));
|
|
||||||
if (dot_dynamic_sec == NULL || dot_dynamic_sec->sh_size == 0) {
|
if (dot_dynamic_sec == NULL || dot_dynamic_sec->sh_size == 0) {
|
||||||
DynData.d.a = std::numeric_limits<uint32_t>::max();
|
DynData.d.a = std::numeric_limits<uint32_t>::max();
|
||||||
} else {
|
} else {
|
||||||
@@ -1710,7 +1699,6 @@ typename ELFObjectFile<target_endianness, is64Bits>::dyn_iterator
|
|||||||
ELFObjectFile<target_endianness, is64Bits>
|
ELFObjectFile<target_endianness, is64Bits>
|
||||||
::end_dynamic_table() const {
|
::end_dynamic_table() const {
|
||||||
DataRefImpl DynData;
|
DataRefImpl DynData;
|
||||||
memset(&DynData, 0, sizeof(DynData));
|
|
||||||
DynData.d.a = std::numeric_limits<uint32_t>::max();
|
DynData.d.a = std::numeric_limits<uint32_t>::max();
|
||||||
return dyn_iterator(DynRef(DynData, this));
|
return dyn_iterator(DynRef(DynData, this));
|
||||||
}
|
}
|
||||||
|
@@ -38,6 +38,9 @@ union DataRefImpl {
|
|||||||
uint32_t a, b;
|
uint32_t a, b;
|
||||||
} d;
|
} d;
|
||||||
uintptr_t p;
|
uintptr_t p;
|
||||||
|
DataRefImpl() {
|
||||||
|
std::memset(this, 0, sizeof(DataRefImpl));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class content_type>
|
template<class content_type>
|
||||||
@@ -94,9 +97,7 @@ class RelocationRef {
|
|||||||
const ObjectFile *OwningObject;
|
const ObjectFile *OwningObject;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RelocationRef() : OwningObject(NULL) {
|
RelocationRef() : OwningObject(NULL) { }
|
||||||
std::memset(&RelocationPimpl, 0, sizeof(RelocationPimpl));
|
|
||||||
}
|
|
||||||
|
|
||||||
RelocationRef(DataRefImpl RelocationP, const ObjectFile *Owner);
|
RelocationRef(DataRefImpl RelocationP, const ObjectFile *Owner);
|
||||||
|
|
||||||
@@ -136,9 +137,7 @@ class SectionRef {
|
|||||||
const ObjectFile *OwningObject;
|
const ObjectFile *OwningObject;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SectionRef() : OwningObject(NULL) {
|
SectionRef() : OwningObject(NULL) { }
|
||||||
std::memset(&SectionPimpl, 0, sizeof(SectionPimpl));
|
|
||||||
}
|
|
||||||
|
|
||||||
SectionRef(DataRefImpl SectionP, const ObjectFile *Owner);
|
SectionRef(DataRefImpl SectionP, const ObjectFile *Owner);
|
||||||
|
|
||||||
@@ -175,9 +174,7 @@ class SymbolRef {
|
|||||||
const ObjectFile *OwningObject;
|
const ObjectFile *OwningObject;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SymbolRef() : OwningObject(NULL) {
|
SymbolRef() : OwningObject(NULL) { }
|
||||||
std::memset(&SymbolPimpl, 0, sizeof(SymbolPimpl));
|
|
||||||
}
|
|
||||||
|
|
||||||
enum Type {
|
enum Type {
|
||||||
ST_Unknown, // Type not specified
|
ST_Unknown, // Type not specified
|
||||||
@@ -236,9 +233,7 @@ class LibraryRef {
|
|||||||
const ObjectFile *OwningObject;
|
const ObjectFile *OwningObject;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LibraryRef() : OwningObject(NULL) {
|
LibraryRef() : OwningObject(NULL) { }
|
||||||
std::memset(&LibraryPimpl, 0, sizeof(LibraryPimpl));
|
|
||||||
}
|
|
||||||
|
|
||||||
LibraryRef(DataRefImpl LibraryP, const ObjectFile *Owner);
|
LibraryRef(DataRefImpl LibraryP, const ObjectFile *Owner);
|
||||||
|
|
||||||
|
@@ -282,7 +282,6 @@ error_code COFFObjectFile::getSymbolSection(DataRefImpl Symb,
|
|||||||
const coff_section *sec = 0;
|
const coff_section *sec = 0;
|
||||||
if (error_code ec = getSection(symb->SectionNumber, sec)) return ec;
|
if (error_code ec = getSection(symb->SectionNumber, sec)) return ec;
|
||||||
DataRefImpl Sec;
|
DataRefImpl Sec;
|
||||||
std::memset(&Sec, 0, sizeof(Sec));
|
|
||||||
Sec.p = reinterpret_cast<uintptr_t>(sec);
|
Sec.p = reinterpret_cast<uintptr_t>(sec);
|
||||||
Result = section_iterator(SectionRef(Sec, this));
|
Result = section_iterator(SectionRef(Sec, this));
|
||||||
}
|
}
|
||||||
@@ -374,7 +373,6 @@ error_code COFFObjectFile::sectionContainsSymbol(DataRefImpl Sec,
|
|||||||
relocation_iterator COFFObjectFile::getSectionRelBegin(DataRefImpl Sec) const {
|
relocation_iterator COFFObjectFile::getSectionRelBegin(DataRefImpl Sec) const {
|
||||||
const coff_section *sec = toSec(Sec);
|
const coff_section *sec = toSec(Sec);
|
||||||
DataRefImpl ret;
|
DataRefImpl ret;
|
||||||
std::memset(&ret, 0, sizeof(ret));
|
|
||||||
if (sec->NumberOfRelocations == 0)
|
if (sec->NumberOfRelocations == 0)
|
||||||
ret.p = 0;
|
ret.p = 0;
|
||||||
else
|
else
|
||||||
@@ -386,7 +384,6 @@ relocation_iterator COFFObjectFile::getSectionRelBegin(DataRefImpl Sec) const {
|
|||||||
relocation_iterator COFFObjectFile::getSectionRelEnd(DataRefImpl Sec) const {
|
relocation_iterator COFFObjectFile::getSectionRelEnd(DataRefImpl Sec) const {
|
||||||
const coff_section *sec = toSec(Sec);
|
const coff_section *sec = toSec(Sec);
|
||||||
DataRefImpl ret;
|
DataRefImpl ret;
|
||||||
std::memset(&ret, 0, sizeof(ret));
|
|
||||||
if (sec->NumberOfRelocations == 0)
|
if (sec->NumberOfRelocations == 0)
|
||||||
ret.p = 0;
|
ret.p = 0;
|
||||||
else
|
else
|
||||||
@@ -470,7 +467,6 @@ COFFObjectFile::COFFObjectFile(MemoryBuffer *Object, error_code &ec)
|
|||||||
|
|
||||||
symbol_iterator COFFObjectFile::begin_symbols() const {
|
symbol_iterator COFFObjectFile::begin_symbols() const {
|
||||||
DataRefImpl ret;
|
DataRefImpl ret;
|
||||||
std::memset(&ret, 0, sizeof(DataRefImpl));
|
|
||||||
ret.p = reinterpret_cast<intptr_t>(SymbolTable);
|
ret.p = reinterpret_cast<intptr_t>(SymbolTable);
|
||||||
return symbol_iterator(SymbolRef(ret, this));
|
return symbol_iterator(SymbolRef(ret, this));
|
||||||
}
|
}
|
||||||
@@ -478,7 +474,6 @@ symbol_iterator COFFObjectFile::begin_symbols() const {
|
|||||||
symbol_iterator COFFObjectFile::end_symbols() const {
|
symbol_iterator COFFObjectFile::end_symbols() const {
|
||||||
// The symbol table ends where the string table begins.
|
// The symbol table ends where the string table begins.
|
||||||
DataRefImpl ret;
|
DataRefImpl ret;
|
||||||
std::memset(&ret, 0, sizeof(DataRefImpl));
|
|
||||||
ret.p = reinterpret_cast<intptr_t>(StringTable);
|
ret.p = reinterpret_cast<intptr_t>(StringTable);
|
||||||
return symbol_iterator(SymbolRef(ret, this));
|
return symbol_iterator(SymbolRef(ret, this));
|
||||||
}
|
}
|
||||||
@@ -511,14 +506,12 @@ StringRef COFFObjectFile::getLoadName() const {
|
|||||||
|
|
||||||
section_iterator COFFObjectFile::begin_sections() const {
|
section_iterator COFFObjectFile::begin_sections() const {
|
||||||
DataRefImpl ret;
|
DataRefImpl ret;
|
||||||
std::memset(&ret, 0, sizeof(DataRefImpl));
|
|
||||||
ret.p = reinterpret_cast<intptr_t>(SectionTable);
|
ret.p = reinterpret_cast<intptr_t>(SectionTable);
|
||||||
return section_iterator(SectionRef(ret, this));
|
return section_iterator(SectionRef(ret, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
section_iterator COFFObjectFile::end_sections() const {
|
section_iterator COFFObjectFile::end_sections() const {
|
||||||
DataRefImpl ret;
|
DataRefImpl ret;
|
||||||
std::memset(&ret, 0, sizeof(DataRefImpl));
|
|
||||||
ret.p = reinterpret_cast<intptr_t>(SectionTable + Header->NumberOfSections);
|
ret.p = reinterpret_cast<intptr_t>(SectionTable + Header->NumberOfSections);
|
||||||
return section_iterator(SectionRef(ret, this));
|
return section_iterator(SectionRef(ret, this));
|
||||||
}
|
}
|
||||||
@@ -669,7 +662,6 @@ error_code COFFObjectFile::getRelocationSymbol(DataRefImpl Rel,
|
|||||||
SymbolRef &Res) const {
|
SymbolRef &Res) const {
|
||||||
const coff_relocation* R = toRel(Rel);
|
const coff_relocation* R = toRel(Rel);
|
||||||
DataRefImpl Symb;
|
DataRefImpl Symb;
|
||||||
std::memset(&Symb, 0, sizeof(Symb));
|
|
||||||
Symb.p = reinterpret_cast<uintptr_t>(SymbolTable + R->SymbolTableIndex);
|
Symb.p = reinterpret_cast<uintptr_t>(SymbolTable + R->SymbolTableIndex);
|
||||||
Res = SymbolRef(Symb, this);
|
Res = SymbolRef(Symb, this);
|
||||||
return object_error::success;
|
return object_error::success;
|
||||||
@@ -749,7 +741,6 @@ error_code COFFObjectFile::getRelocationValueString(DataRefImpl Rel,
|
|||||||
const coff_symbol *symb = 0;
|
const coff_symbol *symb = 0;
|
||||||
if (error_code ec = getSymbol(reloc->SymbolTableIndex, symb)) return ec;
|
if (error_code ec = getSymbol(reloc->SymbolTableIndex, symb)) return ec;
|
||||||
DataRefImpl sym;
|
DataRefImpl sym;
|
||||||
::memset(&sym, 0, sizeof(sym));
|
|
||||||
sym.p = reinterpret_cast<uintptr_t>(symb);
|
sym.p = reinterpret_cast<uintptr_t>(symb);
|
||||||
StringRef symname;
|
StringRef symname;
|
||||||
if (error_code ec = getSymbolName(sym, symname)) return ec;
|
if (error_code ec = getSymbolName(sym, symname)) return ec;
|
||||||
|
@@ -34,7 +34,6 @@ MachOObjectFile::MachOObjectFile(MemoryBuffer *Object, MachOObject *MOO,
|
|||||||
MachOObj(MOO),
|
MachOObj(MOO),
|
||||||
RegisteredStringTable(std::numeric_limits<uint32_t>::max()) {
|
RegisteredStringTable(std::numeric_limits<uint32_t>::max()) {
|
||||||
DataRefImpl DRI;
|
DataRefImpl DRI;
|
||||||
DRI.d.a = DRI.d.b = 0;
|
|
||||||
moveToNextSection(DRI);
|
moveToNextSection(DRI);
|
||||||
uint32_t LoadCommandCount = MachOObj->getHeader().NumLoadCommands;
|
uint32_t LoadCommandCount = MachOObj->getHeader().NumLoadCommands;
|
||||||
while (DRI.d.a < LoadCommandCount) {
|
while (DRI.d.a < LoadCommandCount) {
|
||||||
@@ -355,7 +354,6 @@ error_code MachOObjectFile::getSymbolType(DataRefImpl Symb,
|
|||||||
symbol_iterator MachOObjectFile::begin_symbols() const {
|
symbol_iterator MachOObjectFile::begin_symbols() const {
|
||||||
// DRI.d.a = segment number; DRI.d.b = symbol index.
|
// DRI.d.a = segment number; DRI.d.b = symbol index.
|
||||||
DataRefImpl DRI;
|
DataRefImpl DRI;
|
||||||
DRI.d.a = DRI.d.b = 0;
|
|
||||||
moveToNextSymbol(DRI);
|
moveToNextSymbol(DRI);
|
||||||
return symbol_iterator(SymbolRef(DRI, this));
|
return symbol_iterator(SymbolRef(DRI, this));
|
||||||
}
|
}
|
||||||
@@ -363,7 +361,6 @@ symbol_iterator MachOObjectFile::begin_symbols() const {
|
|||||||
symbol_iterator MachOObjectFile::end_symbols() const {
|
symbol_iterator MachOObjectFile::end_symbols() const {
|
||||||
DataRefImpl DRI;
|
DataRefImpl DRI;
|
||||||
DRI.d.a = MachOObj->getHeader().NumLoadCommands;
|
DRI.d.a = MachOObj->getHeader().NumLoadCommands;
|
||||||
DRI.d.b = 0;
|
|
||||||
return symbol_iterator(SymbolRef(DRI, this));
|
return symbol_iterator(SymbolRef(DRI, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -601,7 +598,6 @@ error_code MachOObjectFile::sectionContainsSymbol(DataRefImpl Sec,
|
|||||||
|
|
||||||
relocation_iterator MachOObjectFile::getSectionRelBegin(DataRefImpl Sec) const {
|
relocation_iterator MachOObjectFile::getSectionRelBegin(DataRefImpl Sec) const {
|
||||||
DataRefImpl ret;
|
DataRefImpl ret;
|
||||||
ret.d.a = 0;
|
|
||||||
ret.d.b = getSectionIndex(Sec);
|
ret.d.b = getSectionIndex(Sec);
|
||||||
return relocation_iterator(RelocationRef(ret, this));
|
return relocation_iterator(RelocationRef(ret, this));
|
||||||
}
|
}
|
||||||
@@ -624,7 +620,6 @@ relocation_iterator MachOObjectFile::getSectionRelEnd(DataRefImpl Sec) const {
|
|||||||
|
|
||||||
section_iterator MachOObjectFile::begin_sections() const {
|
section_iterator MachOObjectFile::begin_sections() const {
|
||||||
DataRefImpl DRI;
|
DataRefImpl DRI;
|
||||||
DRI.d.a = DRI.d.b = 0;
|
|
||||||
moveToNextSection(DRI);
|
moveToNextSection(DRI);
|
||||||
return section_iterator(SectionRef(DRI, this));
|
return section_iterator(SectionRef(DRI, this));
|
||||||
}
|
}
|
||||||
@@ -632,7 +627,6 @@ section_iterator MachOObjectFile::begin_sections() const {
|
|||||||
section_iterator MachOObjectFile::end_sections() const {
|
section_iterator MachOObjectFile::end_sections() const {
|
||||||
DataRefImpl DRI;
|
DataRefImpl DRI;
|
||||||
DRI.d.a = MachOObj->getHeader().NumLoadCommands;
|
DRI.d.a = MachOObj->getHeader().NumLoadCommands;
|
||||||
DRI.d.b = 0;
|
|
||||||
return section_iterator(SectionRef(DRI, this));
|
return section_iterator(SectionRef(DRI, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -708,7 +702,6 @@ error_code MachOObjectFile::getRelocationSymbol(DataRefImpl Rel,
|
|||||||
bool isExtern = (RE->Word1 >> 27) & 1;
|
bool isExtern = (RE->Word1 >> 27) & 1;
|
||||||
|
|
||||||
DataRefImpl Sym;
|
DataRefImpl Sym;
|
||||||
Sym.d.a = Sym.d.b = 0;
|
|
||||||
moveToNextSymbol(Sym);
|
moveToNextSymbol(Sym);
|
||||||
if (isExtern) {
|
if (isExtern) {
|
||||||
for (unsigned i = 0; i < SymbolIdx; i++) {
|
for (unsigned i = 0; i < SymbolIdx; i++) {
|
||||||
|
Reference in New Issue
Block a user