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

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 22 14:27:58 PST 2017


On Wed, Feb 22, 2017 at 02:14:11PM -0800, Rui Ueyama via llvm-commits wrote:
> On Wed, Feb 22, 2017 at 2:11 PM, Joerg Sonnenberger <joerg at bec.de> wrote:
> 
> > On Wed, Feb 22, 2017 at 01:45:56PM -0800, Rui Ueyama via llvm-commits
> > wrote:
> > > 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.
> >
> > This is platform dependent. E.g. for x86_64, the default is that textrel
> > are invalid, for i386 it is valid.
> >
> 
> What will happen if the linker finds an invalid relocation? Does it refuse
> to create an output?

Hm. Sorry, scratch that. *sigh* It was supposed to reject them by
default, but I guess GNU ever implemented that...

Joerg


More information about the llvm-commits mailing list