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]

Re: "reloc refers to symbol ... which is not being output" from cygwinld -r


----- Original Message -----
From: "Nick Clifton"
To: "Brian R. Gaeke"
Sent: Thursday, 21 August 2003 17:01
Subject: Re: "reloc refers to symbol ... which is not being output" from
cygwin ld -r


> Hi Brian,
>
> > No problem. Here are the objects (1.o and 2.o) as well as the
sources
> > and a shell script to re-create them (reproduce-bug).
>
> Thanks for the attachment.  Please could you try the attached patch
> which I think should solve the problem.  If it does work please let me
> know so that I can check it in.
>
> Cheers
>         Nick
>
> 2003-08-21  Nick Clifton  <nickc@redhat.com>
>
> * cofflink.c (_bfd_coff_link_input_bfd): Do not skip sections
> containing relocs.
>

I have tried your patch with mingw ( gcc-3.3.1) and it improves but does
not fix completely.

With Brian's testcase (as sent), there is no problem.
If I modify  by adding -g (which on mingw is stabs debug info) to
compile switches
g++ -g  -c -o 1.o 1.cpp
g++ -g  -c -o 2.o 2.cpp
ld -r -o 3.o  1.o 2.o

I still get problems with .stab symbols:

D:\develop\bugs\link_bug>ld -r -o 3.o 1.o 2.o
2.o(.stab+0x36a0): In function `_tcf_0':
D:/develop/bugs/link_bug/2.cpp:3: reloc refers to symbol
`.text$_ZNSaISsEC1Ev' which is not being output
2.o(.stab+0x451c):D:/develop/bugs/link_bug/2.cpp:3: reloc refers to
symbol `.text$_ZnwjPv' which is not being output


Stripping the debug symbols, ie:
D:\develop\bugs\link_bug>ld -r -S -o 3.o 1.o 2.o
 produces no error.


Danny


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