[PATCH] D42872: Fix handling of zero-size segments in llvm-objcopy
vit9696 via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 03:34:13 PST 2018
vit9696 added a comment.
@jhenderson, thanks, NOBITS makes a lot more sense to me than your previous example. Yet I am unaware of any software or even any tool that would rely on such on offset, and to my eyes the linkers are simply doing the wrong thing by not setting the offset of 0 for whatever reason. In my opinion being able to copy more ELF files, which will be most likely valid and loaded on a target system, is more important, than trying to support some shady offset to a non-existent memory nobody knows how to calculate.
I was able to produce the test case based on program-header-nobits.yaml, but I am not sure whether I should actually include it. Because as I stated above, whatever the offset is, it is undefined.
Repository:
rL LLVM
https://reviews.llvm.org/D42872
More information about the llvm-commits
mailing list