[PATCH] D30256: [ELF] - Implemented -z noreloc-overflow.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 22 12:41:59 PST 2017


On Wed, Feb 22, 2017 at 12:22 PM, George Rimar <grimar at accesssoftek.com>
wrote:

> >Allowing relocations against text segments when -no-dynamic-linker is
> given sounds too hacky and not OK. You cannot describe >why it makes sense,
> right? By making sense, I don't mean "because Linux kernel needs this" but
> something like "-no-dynamic->linker is an option to do blah blah and
> semantically it naturally implies it should allow text relocations".
>
> Well, may be I can.
>
> Lets start from simple.
> Why do we restrict relocations against text segment ? I guess because we
> having such relocations
> means that text segments will not be shared right ? (if we are talking
> about DSO).
> That is not fine, but not a critical issue too.
>
> But why do we restrict relocations for PIE ?​
>

It doesn't make sense to me. The definition of the option is this:
-no-dynamic-linker is an option to not add .interp section, period.
Essentially, you need to keep the semantics of each option as clear as
possible instead of overloading multiple meanings to one option.

Maybe we should just allow text relocations.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170222/86d307b6/attachment.html>


More information about the llvm-commits mailing list