[mach-o] Support fat archives

Description

[mach-o] Support fat archives

mach-o supports "fat" files which are a header/table-of-contents followed by a
concatenation of mach-o files (or archives of mach-o files) built for
different architectures. Previously, the support for fat files was in the
MachOReader, but that only supported fat .o files and dylibs (not archives).

The fix is to put the fat handing into MachOFileNode. That way any input file
kind (including archives) can be fat. MachOFileNode selects the sub-range
of the fat file that matches the arch being linked and creates a MemoryBuffer
for just that subrange.

Details

Auditors
Bigcheese
Committed
kledzikOct 7 2014, 6:48 PM
Parents
rL219267: [PECOFF] Move a function out of a class
Branches
Unknown
Tags
Unknown