This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR ld/4304: ld --fatal-warnings doesn't work


On Tue, Apr 10, 2007 at 10:37:15PM +0100, Nick Clifton wrote:
> Hi H. J.
> 
> >This is the patch I am checking in. The old linker gives
> >
> >bash-3.1$ make LD=ld
> >gcc -c -m32 -o 32.o foo.c
> >ld -shared -melf_i386 --warn-shared-textrel --fatal-warnings -o 32.so
> >32.o
> >ld: warning: creating a DT_TEXTREL in a shared object.
> >bash-3.1$ 
> >
> >The new linker gives
> >
> >bash-3.1$ make
> >gcc -c -m32 -o 32.o foo.c
> >./ld -shared -melf_i386 --warn-shared-textrel --fatal-warnings -o 32.so
> >32.o
> >./ld: warning: creating a DT_TEXTREL in a shared object.
> >make: *** [32.so] Error 1
> 
> This does not seem quite right to me.  If this warning is sufficiently 
> serious that it is going to prevent the generation of a working 
> executable then why is it only a warning and not an error ?

It is a warning, not an error since DT_TEXTREL only indicates that
there are relocations in the text section. It isn't a good idea.
But executable will run.


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]