[PATCH] D90897: [llvm-objcopy] --only-keep-debug: place zero-size segment according to its parent segment
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 6 08:17:06 PST 2020
MaskRay added a comment.
In D90897#2378385 <https://reviews.llvm.org/D90897#2378385>, @jhenderson wrote:
> Won't this fail if the PT_LOAD the PT_TLS should be in has a zero size too?
PT_LOAD with p_memsz is invalid on Linux. Attempting to mmap a zero-sized segment will fail.
> In such a case, the PT_TLS segment won't be nested inside anything (see `segmentOverlapsSegment`).
Where PT_TLS is nested is an insignificant detail. For --only-keep-debug, the program headers are retained just so that address mapping can work without access to the original program headers. For other program headers, it is rather unimportant whether they are mapped.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90897/new/
https://reviews.llvm.org/D90897
More information about the llvm-commits
mailing list