This is the mail archive of the binutils@sources.redhat.com 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]

PATCH: Revert the last ld change (Re: ld is broken)


On Tue, Oct 08, 2002 at 09:04:28AM -0700, H. J. Lu wrote:
> On Tue, Oct 08, 2002 at 07:00:33AM -0700, H. J. Lu wrote:
> > I got
> > 
> > mipsel-linux-gcc -O2  -DPURE_TERMINFO -DSVR4_CURSES  -o ncurses ../obj_s/ncurses.o -L../lib -lform -lmenu -lpanel -lncurses    -Wl,-rpath,/export/redhat/rpms/BUILD/ncurses-5.2/lib  
> > /export/tools/lib/gcc-lib/mipsel-linux/2.96/collect2 -dynamic-linker /lib/ld.so.1 -o ncurses /export/tools/lib/gcc-lib/mipsel-linux/2.96/../../../../mipsel-linux/lib/crt1.o /export/tools/lib/gcc-lib/mipsel-linux/2.96/../../../../mipsel-linux/lib/crti.o /export/tools/lib/gcc-lib/mipsel-linux/2.96/crtbegin.o -L../lib -L/export/tools/lib/gcc-lib/mipsel-linux/2.96 -L/export/tools/lib/gcc-lib/mipsel-linux/2.96/../../../../mipsel-linux/lib ../obj_s/ncurses.o -lform -lmenu -lpanel -lncurses -rpath /export/redhat/rpms/BUILD/ncurses-5.2/lib -lgcc -lc -lgcc /export/tools/lib/gcc-lib/mipsel-linux/2.96/crtend.o /export/tools/lib/gcc-lib/mipsel-linux/2.96/../../../../mipsel-linux/lib/crtn.o
> > /export/tools/lib/gcc-lib/mipsel-linux/2.96/../../../../mipsel-linux/bin/ld: input file ncurses is also the output file!
> > collect2: ld returned 1 exit status
> > 
> > I will try to write a testcase for it.
> > 
> 
> This patch
> 
> http://sources.redhat.com/ml/binutils/2002-10/msg00129.html
> 
> is almost completely bogus. For one thing, the error message is very
> much misleading. There is no such a input file `ncurses' above. Also it
> doesn't check symlinks/hardlinks. Many targets, like Linux, may open
> some files for read implicitly via DT_NEEDED. I'd like to revert it
> now.
> 
> To do it right, you have to check every open against the output. Also
> comparing filename is not enough in that case.
> 

I am going to check in this patch shortly.


H.J.

Attachment: ld-bogus.patch
Description: Text document


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