[PATCH] D17857: [ELF] - DT_TEXTREL/DF_TEXTREL flags implemented.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 3 16:33:25 PST 2016


Detecting is as hard (or as easy) as adding the DT_TEXTREL flag. Adding the
flag is just one line of code and other code is to detect it after all.
That brings us back to the point that whether this approach is satisfactory
or not. Particularly, I think you can still create a binary with
relocations to read-only sections with this patch if you use a convoluted
linker script. I don't think we want to submit a half-baked logic just to
detect some situation.

On Thu, Mar 3, 2016 at 4:24 PM, Joerg Sonnenberger via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> On Thu, Mar 03, 2016 at 01:49:27PM -0800, Rui Ueyama wrote:
> > But I still want to defer that until someone comes up with a program that
> > they want to link with lld and say that they need this. As Davide pointed
> > out, I'm also not entirely sure if this is the right approach, and if we
> do
> > not have to discuss design right now, I want to do this later.
>
> I think we should at least detect it and bail out. I'm not that attached
> to text relocations otherwise, but silently creating bad binaries when
> we can reasonable easily detect seems bad. Consider the problems with
> MIPS EH frame layout, which is normally only visible due to the
> resulting text relocation warnings/errors.
>
> Joerg
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160303/2bf549f7/attachment.html>


More information about the llvm-commits mailing list