[PATCH] [PATCH][lld][mach-o] normalized mach-o yaml

Nick Kledzik kledzik at apple.com
Fri Oct 4 17:18:05 PDT 2013


Just realized this did not get CC’d to llvm-commits

-Nick

Begin forwarded message:
> From: "kledzik at apple.com" <kledzik at apple.com>
> Subject: [PATCH] [PATCH][lld][mach-o] normalized mach-o yaml
> Date: October 3, 2013 at 6:39:34 PM PDT
> To: bigcheesegs at gmail.com, shankarke at gmail.com, kledzik at apple.com
> Reply-To: reviews+D1829+public+e688e59ffde578e7 at llvm-reviews.chandlerc.com
> 
> Hi Bigcheese, shankarke,
> 
> This is the first step in how I plan to get mach-o object files support into 
> lld. We need to be able to test the mach-o Reader and Write on systems without 
> a mach-o tools. Therefore, we want to support a textual way (YAML) to represent 
> mach-o files.
> 
> MachONormalizedFile.h defines an in-memory abstraction of the content of mach-o  
> files. The in-memory data structures are always native endianess and always
> use 64-bit sizes. This means there are no C++ templates for handling mach-o
> pointer size and endianness. This internal data structure can then be converted to or
> from three different formats: 1) yaml (text) encoded mach-o, 2) binary mach-o
> files, 3) lld Atoms.
> 
> This patch defines the internal model and uses YAML I/O to implement the 
> conversion to and from the model to yaml. The next patch will implement
> the conversion from normalized to binary mach-o.
> 
> This patch includes unit tests to validate the yaml conversion APIs.
> 
> This is an update to D1276. Since that time, I have:
> * switched to using Support/MachO.h
> * extended the normalized mach-o data structure to support final linked
>  image (not just object files)
> * I've implemented the normalized->binary code (patch coming soon) to
>  validate the normalized mach-o data structure.
> 
> http://llvm-reviews.chandlerc.com/D1829
> 
> Files:
>  include/lld/ReaderWriter/MachOLinkingContext.h
>  unittests/MachOTests
>  unittests/MachOTests/MachONormalizedFileYAMLTests.cpp
>  unittests/MachOTests/CMakeLists.txt
>  unittests/CMakeLists.txt
>  lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
>  lib/ReaderWriter/MachO/MachONormalizedFile.h
>  lib/ReaderWriter/MachO/MachOLinkingContext.cpp
>  lib/ReaderWriter/MachO/CMakeLists.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1829.1.patch
Type: text/x-patch
Size: 66079 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131004/2c57eb14/attachment.bin>
-------------- next part --------------
> 



More information about the llvm-commits mailing list