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

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 23 07:22:33 PST 2017


Rui Ueyama <ruiu at google.com> writes:

> I took a quick look at BFD linker's source code and I think that is right.
> The GNU linker doesn't say anything about text relocations unless "-z text"
> or "-warn-shared-textrel" is given.
>
> So, It think what we should do is this:
>
>  - Add "-z textrel" and treat text relocations as an error only when that
> option is given, and
>  - emit DT_TEXTREL if an output has text relocations.
>
> We don't need to add -warn-shared-textrel at the moment. (We may want it
> later, but you want to focus on one thing at a time.)

I would ask that we keep the default being an error. This is in line
with lld normally being stricter and most of the time a text relocation
will be there because of an user error.

Cheers,
Rafael


More information about the llvm-commits mailing list