Bad patch to elf.c.

H . J . Lu hjl@lucon.org
Tue Oct 10 11:20:00 GMT 2000


On Tue, Oct 10, 2000 at 03:18:54PM +0000, Timothy Alan Chandler wrote:
> I've found what I think is a bug in binutils-2.10.0.29 when used with
> the latest gcc-2.97 snapshot (possibly present when used to bootstraping
> other versions of gcc as well).
> 
> The current gcc snapshot builds without error using the latest binutils.
> However, once installed one gets an undefined symbol in libstdc++:
> 
> /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
> 
> Same happens with other applications linked to libstdc++.  Revert back,
> to binutils-2.10.0.26 and everything works fine.
> 
> I'm not sure if it's gcc bug made visable by the latest changes in
> binutils or if it's a bug in binutils themselves.  Optimization appears
> to have no effect on the problem.
> 
> OS/ARCH:
> 
>   x86 GNU/Linux version 2.4.0 [test9-1] (i686-pc-linux-gnu) Athlon
>   GNU Library C version 2.1.91
> 
> CONFIGURE FLAGS USED:
> 
>   --prefix=/opt/binutils
>   --enable-shared
>   --enable-static
>   --with-gnu-ld
>   --with-gnu-as
> 
> COMPILER FLAGS USED (multiple builds):
> 
>   -O2 -march=athlon -mcpu=athlon -g
>   -O0 -march=athlon -mcpu=athlon -g
>   (default)
> 
> COMPILERS USED (multiple builds):
> 
> Reading specs from
> 	/opt/gcc-devel/lib/gcc-lib/i686-pc-linux-gnu/2.97/specs
> Configured with:  --prefix=/opt/gcc-devel
>                   --with-local-prefix=/opt/gcc-devel
>                   --with-gxx-include-dir=/opt/gcc-devel/include/g++
>                   --enable-shared
>                   --enable-haifa
>                   --with-gnu-ld
>                   --with-gnu-as
>                   --enable-threads=posix
> gcc version 2.97 20001009 (experimental)
> 
> Reading specs from
> 	/opt/gcc/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/specs
> gcc version 2.95.2 19991024 (release)
> 
> Reading specs from
> 	/opt/egcs/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.66.1/specs
> gcc version egcs-2.91.66.1 19990314/Linux (egcs-1.1.2 release)
> 
> All produced similar results (undefined symbol) when used to bootstrap
> the current gcc-2.97 snapshot.
> 
> I know there was talk of incompatabilities on the GCC list especially
> in the C++ language as they work towards gcc-3.0, if this is just one
> of those expected incompatabilities, then please disregard this message.
> If however you require more information please ask and I will try to
> provide it.

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?

Thanks.


H.J.


More information about the Binutils mailing list