[PATCH] [lld] [mach-o] make lld respect alignment constraints more
kledzik at apple.com
kledzik at apple.com
Thu Oct 16 15:55:12 PDT 2014
The ArchHandlers look much better!
================
Comment at: lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp:266-267
@@ -265,4 +265,4 @@
const dysymtab_command *d = reinterpret_cast<const dysymtab_command*>(lc);
- indirectSymbolTableOffset = read32(swap, d->indirectsymoff);
- indirectSymbolTableCount = read32(swap, d->nindirectsyms);
+ indirectSymbolTableOffset = read32((uint8_t *)&d->indirectsymoff, isBig);
+ indirectSymbolTableCount = read32((uint8_t *)&d->nindirectsyms, isBig);
return true;
----------------
This is sad that the casts are needed. Perhaps, read32() can be overloaded to take a uint32_t* so all these casts can be removed.
http://reviews.llvm.org/D5811
More information about the llvm-commits
mailing list