[PATCH] D79038: [objdump][ELF] Handle sections not contained in PT_LOAD segments
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 28 16:13:17 PDT 2020
MaskRay added a comment.
> The code assumed that every parent section would be a PT_LOAD one, but it's possible to create legal ELF binaries where this rule doesn't hold anymore.
It is possible, but I hope we can find legitimate and reasonable use cases. p_memsz(PT_GNU_RELRO) makes sense (-z stack-size=), so this seems to suggest that we should patch `template <class ELFT> void ELFBuilder<ELFT>::setParentSegment(Segment &Child)` to take into account this case (don't set ParentSegment(PT_LOAD) to PT_GNU_STACK)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79038/new/
https://reviews.llvm.org/D79038
More information about the llvm-commits
mailing list