[llvm-dev] elf2yaml document structure, for dynamic symbols

Dave Lee via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 1 10:43:59 PDT 2017


I'm adding support for elf dynamic symbols in yaml2obj/obj2yaml. I'm
seeking opinions about how to model dynamic symbols (and symbols in
general) in the yaml structure. Currently, symbols in elf are represented
by a top level `Symbols` key, within which symbols are grouped by binding
type (Global, Weak, Local). The simplest thing to do would be to mirror
this structure to a DynamicSymbols (or SymbolsDynamic). Is there other ways
people would like to see this structure represented? Saleem suggested
symbols be modeled more closely to the elf spec, and that the binding type
should be represented as an attribute on each symbol, not as a grouping.
For comparison, coff and macho both appear to represent the file format
more directly, without much (any?) added abstraction.

Short pseudo example of the current symbol structure:

    Symbols:
      Global:
        - Name: ...
          Type: ...
          Section: ...
          ...
      Weak:
        - Name: ...
          Type: ...
          Section: ...
          ...
      Local:
        - Name: ...
          Type: ...
          Section: ...
          ...

thanks,
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171101/36a903b8/attachment.html>


More information about the llvm-dev mailing list