[PATCH] D90295: [yaml2obj] - Improve handling of SectionHeaderTable::NoHeaders flag.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 28 05:48:25 PDT 2020
jhenderson added inline comments.
================
Comment at: llvm/lib/ObjectYAML/ELFEmitter.cpp:1885
- // Align the start of the section header table, which is written after all
- // section data.
- uint64_t SHOff =
- State.alignToOffset(CBA, sizeof(typename ELFT::uint), /*Offset=*/None);
- bool ReachedLimit = SHOff + arrayDataSize(makeArrayRef(SHeaders)) > MaxSize;
+ // If needes, align the start of the section header table, which is written
+ // after all section data.
----------------
================
Comment at: llvm/test/tools/yaml2obj/ELF/section-headers.yaml:194-196
+## An arbitrary size to create a piece of dummy
+## data to make llvm-readelf happy.
+ Size: 0x100
----------------
This might want a FIXME note. I think it corresponds to https://bugs.llvm.org/show_bug.cgi?id=40804 (might be worth putting that URL as a reference here too).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90295/new/
https://reviews.llvm.org/D90295
More information about the llvm-commits
mailing list