[PATCH] D29453: [ELF] - Allow going over alignment commands in algorithm of placing non-alloc orphans.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 4 01:05:35 PST 2017
grimar added a comment.
In https://reviews.llvm.org/D29453#666226, @ruiu wrote:
> I did not ask you to verify that the behavior matches with GNU linkers (I was pretty sure that you already did.)
Though I think it is important. If some scripts already relies on this behavior, it is better to follow than invent own unique behavior,
incompatible or partially compatible with existent software.
> What I asked is to reason about it. Can you explain why you think that is semantically correct?
Reason is that such behavior is clear and understandable. When you write script:
SECTIONS {
. = 0x1000;
.text : { *(.text) };
/* all other sections you know about */
. = ALIGN(X);
End = .;
}
I think you expect End to point and indicate the end of sections you aware of. And linker can create other ones, non-allocatables, even those you do not ask for,
like ".comment". And writing this script you do not have to care about that all. That is pretty expectable user-friendly behavior, no ?
https://reviews.llvm.org/D29453
More information about the llvm-commits
mailing list