[PATCH] D94329: [lld-macho] Fix TLV data initialization
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 8 12:12:53 PST 2021
smeenai added inline comments.
================
Comment at: lld/MachO/Writer.cpp:591-594
// ZeroFill sections must always be the at the end of their segments,
// otherwise subsequent sections may get overwritten with zeroes at runtime.
- if (isZeroFill(osec->flags))
+ if (sectionType(osec->flags) == S_ZEROFILL)
return std::numeric_limits<int>::max();
----------------
int3 wrote:
> ld64 has logic that does this, but I have no idea how we can actually test it -- it doesn't look like it's possible to create arbitrary `S_ZEROFILL` sections from assembly, at least if I'm reading MCSectionMachO.cpp correctly. I could remove this / replace it with an assert if anyone cares.
There's a `.zerofill` directive ... does that do what you want?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94329/new/
https://reviews.llvm.org/D94329
More information about the llvm-commits
mailing list