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]

Re: Bad patch to elf.c.


On Tue, 10 Oct 2000, H . J . Lu wrote:

> On Tue, Oct 10, 2000 at 03:18:54PM +0000, Timothy Alan Chandler wrote:
> > /opt/netscape/netscape: error in loading shared libraries:
> > /opt/gcc-devel/lib/libstdc++-libc6.1-1.so.2: undefined symbol:
> > .gnu.linkonce.t.__rs__H3ZcZt18string_char_traits1ZcZt24__default_alloc
> > _template2b1i0_R7istreamRt12basic_string3ZX01ZX11ZX21_R7istream
> 
> This patch
> 
> 2000-10-07  Alan Modra  <alan@linuxcare.com.au>
> 
> 	* elf.c (swap_out_syms): Handle global section symbols.
> 
> breaks the linker. Alan, do you have a fix?

It's more likely my change to gas/config/obj-elf.c that goes with this 
one that does the damage.

Arrgh, after looking a little in the dynamic linker, I see

glibc/elf/do-lookup.h:
	  if (ELFW(ST_TYPE) (sym->st_info) > STT_FUNC)
	    /* Ignore all but STT_NOTYPE, STT_OBJECT and STT_FUNC entries
	       since these are no code/data definitions.  */
	    continue;

which will ignore a global STT_SECTION symbol, as STT_FUNC == 2 and
STT_SECTION == 3.  I guess this means that ld will have to munge global
section symbols back to local on a final link.  I'll investigate this
approach.

Regards, Alan Modra
-- 
Linuxcare.  Support for the Revolution.


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