[llvm-objcopy] Fix misaligned access to load command data.
It seems that llvm-objcopy stores data temporarily misaligned with the requirements of the underlaying struct from libBinaryFormat, and UBSan generates a runtime error. Instead of trying to reinterpret the memory as the struct itself, simply access the `char *` pointer that we are interested in, and that do not have alignment restrictions. This problem was pointed out in a comment of D111164. Differential Revision: https://reviews.llvm.org/D112744
Loading
Please sign in to comment