[PATCH] [MachO] Support reading of fat binaries.

Joey Gouly joey.gouly at gmail.com
Fri Jan 10 18:43:11 PST 2014


Hi kledzik,

This adds some basic support for reading of fat binaries. I tested this on some system libraries, and it seems to work!

Could mb1 have a better name? mb_original? Not really sure.

The "empty_obj_x86_armv7.txt" file was generated by taking the bytes from the empty_obj_x86 and empty_obj_armv7 tests inside MachONormalizedFileBinaryReaderTests.cpp, turning them into object files and then using lipo to create a fat binary. It seems to have inserted a lot of empty bytes, I'm not sure if I can generate a binary that doesn't have all this padding.

http://llvm-reviews.chandlerc.com/D2537

Files:
  lib/ReaderWriter/MachO/MachONormalizedFile.h
  lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
  unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp
  unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp
  unittests/MachOTests/empty_obj_x86_armv7.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2537.1.patch
Type: text/x-patch
Size: 112881 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140110/610e601d/attachment.bin>


More information about the llvm-commits mailing list