[PATCH] D69709: [yaml2obj] - Add a way to describe the custom data that is not part of an output section.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 10:57:09 PST 2019


MaskRay added inline comments.


================
Comment at: llvm/lib/ObjectYAML/ELFYAML.cpp:1485
   IO.mapOptional("ProgramHeaders", Object.ProgramHeaders);
-  IO.mapOptional("Sections", Object.Sections);
+  IO.mapOptional("Sections", Object.Descriptions);
   IO.mapOptional("Symbols", Object.Symbols);
----------------
I feel that using `Sections` for `Fragment`s may be confusing because `Fragment`s are not described by the section header table. Does a new field add a lot of complexity? If not, we can add a parallel YAML mapping key `Fragments`, and use `Fragments` instead of `Sections` when there is a need for a `Fragment` (i.e. when there is non-section data that needs describing).

Opinions? @rupprecht @jhenderson @labath


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69709/new/

https://reviews.llvm.org/D69709





More information about the llvm-commits mailing list