[llvm-commits] lld - WriterELF.cpp: Add case to SectionChunk

Nick Kledzik kledzik at apple.com
Wed Sep 26 14:27:22 PDT 2012


On Sep 26, 2012, at 2:03 PM, Michael Spencer wrote:
> 
> The problem with moving all the reader stuff out to a header so the
> writer can access it is that it breaks going to native/yaml format.
> The writer can't assume it has a ELFDefinedAtom and such.

To expand on this a bit, we really want the abstract Atom model to be able to capture all the information in object files.  If a Reader and Writer have a side channel (such as common Atom subclasses), then it is easy to let information slip from the Reader to the Writer through the side channel instead of enhancing the Atom model.  And if the Atom model is not enhanced, then that extra information won't be expressible in yaml (for test cases) or the native file format (for future use).

-Nick




More information about the llvm-commits mailing list