File tree Expand file tree Collapse file tree 3 files changed +2
-7
lines changed
llvm/tools/llvm-objcopy/MachO Expand file tree Collapse file tree 3 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ void MachOReader::setSymbolInRelocationInfo(Object &O) const {
206
206
for (auto &Reloc : Sec->Relocations )
207
207
if (!Reloc.Scattered )
208
208
Reloc.Symbol = O.SymTable .getSymbolByIndex (
209
- Reloc.getPlainRelocationSymbolNum (O .isLittleEndian ()));
209
+ Reloc.getPlainRelocationSymbolNum (MachOObj .isLittleEndian ()));
210
210
}
211
211
212
212
void MachOReader::readRebaseInfo (Object &O) const {
Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ void MachOWriter::writeSections() {
242
242
auto RelocInfo = Sec->Relocations [Index];
243
243
if (!RelocInfo.Scattered )
244
244
RelocInfo.setPlainRelocationSymbolNum (RelocInfo.Symbol ->Index ,
245
- O. isLittleEndian () );
245
+ IsLittleEndian );
246
246
247
247
if (IsLittleEndian != sys::IsLittleEndianHost)
248
248
MachO::swapStruct (
Original file line number Diff line number Diff line change @@ -314,11 +314,6 @@ struct Object {
314
314
// / is not too long (SegName.size() should be less than or equal to 16).
315
315
LoadCommand &addSegment (StringRef SegName);
316
316
317
- bool isLittleEndian () const {
318
- StringRef Magic (reinterpret_cast <const char *>(&Header.Magic ), 4 );
319
- return Magic == " \xCE\xFA\xED\xFE " || Magic == " \xCF\xFA\xED\xFE " ;
320
- }
321
-
322
317
bool is64Bit () const {
323
318
return Header.Magic == MachO::MH_MAGIC_64 ||
324
319
Header.Magic == MachO::MH_CIGAM_64;
You can’t perform that action at this time.
0 commit comments