[PATCH] D20378: [lld] Wrong section VMA/LMA in case of using linker scripts
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu May 19 09:38:07 PDT 2016
grimar added a comment.
In http://reviews.llvm.org/D20378#434465, @ruiu wrote:
> We cannot say if this is a bug because the linker script has no spec, but it may be considered as a bug. So the thing here is that if the user instructs the linker to create an output section from input sections with various types of attributes (executable, writable, etc.), what the linker should do. GNU linker seems to create a single section anyways. We are currently creating multiple sections, binned by section attributes. It seems that GNU's behavior makes more sense.
>
> I'm okay with this patch since the previous behavior was more buggy than this, though.
Yes, my comment was in general, have nothing against this patch.
But returning to a bug: linker has ONLY_IF_RO/ONLY_IF_RW commands, so (I did not check, but it seems)
that it is possible to achieve the behavior this patch shows if using them, but probably not the opposite (gnu) one.
That is why I think gnu default behavior is correct as default at in that way we are really should be able to layout in all possible ways.
Repository:
rL LLVM
http://reviews.llvm.org/D20378
More information about the llvm-commits
mailing list