[lld] r219268 - [mach-o] Support fat archives

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Oct 9 14:57:12 PDT 2014

On 7 October 2014 21:48, Nick Kledzik <kledzik at apple.com> wrote:
> Author: kledzik
> Date: Tue Oct  7 20:48:10 2014
> New Revision: 219268
> URL: http://llvm.org/viewvc/llvm-project?rev=219268&view=rev
> Log:
> [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.

Interesting. I wonder if a similar change should be done to
Object/MachOUniversal.cpp. Do tools like nm support fat archives?


More information about the llvm-commits mailing list