This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: "reloc refers to symbol ... which is not being output" fromcygwin ld -r
- From: Nick Clifton <nickc at redhat dot com>
- To: Danny Smith <dannysmith at users dot sourceforge dot net>
- Cc: "Brian R. Gaeke" <gaeke at uiuc dot edu>, "binutils at sources dot redhat dot com"<binutils at sources dot redhat dot com>
- Date: Tue, 02 Sep 2003 12:49:43 +0100
- Subject: Re: "reloc refers to symbol ... which is not being output" fromcygwin ld -r
- References: <20030813203446.GA14134@niobe.cs.uiuc.edu><20030814031959.GT27145@bubble.sa.bigpond.net.au><20030818173029.GA21742@niobe.cs.uiuc.edu> <m3d6ezq9sj.fsf@redhat.com><000701c36afb$04ead420$1790a7cb@DANNY> <m3vfsk3zzq.fsf@redhat.com><001201c36c5b$1dbb3e20$2e90a7cb@DANNY>
Hi Danny,
> Attached are assembler and object fles for 1.cpp and 2.cpp compiled
> with
> g++-3.3.1 -g
> using mingw native build of gcc
> and gas
> GNU assembler 2.14.90 20030807
Thanks very much.
Here is a much better patch which I think will really fix the problem
this time. Please ignore the previous patch and apply this one
instead and then let me know how you get on.
Cheers
Nick
2003-09-02 Nick Clifton <nickc@redhat.com>
* cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
symbols that are used in relocs.
*** bfd/cofflink.c.~1.38.~ 2003-08-21 17:07:40.000000000 +0100
--- bfd/cofflink.c 2003-09-02 12:32:25.000000000 +0100
*************** _bfd_coff_link_input_bfd (struct coff_fi
*** 1481,1493 ****
/* Skip section symbols for sections which are not going to be
emitted. */
if (!skip
&& isym.n_sclass == C_STAT
&& isym.n_type == T_NULL
! && isym.n_numaux > 0)
! {
! if ((*secpp)->output_section == bfd_abs_section_ptr)
! skip = TRUE;
! }
#endif
/* If we stripping debugging symbols, and this is a debugging
--- 1481,1492 ----
/* Skip section symbols for sections which are not going to be
emitted. */
if (!skip
+ && dont_skip_symbol == 0
&& isym.n_sclass == C_STAT
&& isym.n_type == T_NULL
! && isym.n_numaux > 0
! && (*secpp)->output_section == bfd_abs_section_ptr)
! skip = TRUE;
#endif
/* If we stripping debugging symbols, and this is a debugging