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" fromcygwin ld -r


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
        


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