elflink.c assertion failure during glibc build

H. J. Lu hjl@lucon.org
Wed Mar 17 18:29:00 GMT 2004


On Wed, Mar 17, 2004 at 06:39:06PM +1030, Alan Modra wrote:
> On Tue, Mar 16, 2004 at 09:43:00AM -0800, H. J. Lu wrote:
> > On Tue, Mar 16, 2004 at 01:23:41PM +0100, Jakub Jelinek wrote:
> > > Hi!
> > > 
> > > cat > 1.c <<EOF
> > > int __attribute__((weak)) foo (void) { return 1; }
> > > EOF
> > > cat > 2.c <<EOF
> > > int old_foo (void) { return 2; }
> > > int new_foo (void) { return 3; }
> > > asm (".symver old_foo, foo@GLIBC_2.0");
> > > asm (".symver new_foo, foo@@GLIBC_2.3.4");
> > > EOF
> > > gcc -O2 -fpic -r -o test.o 1.c 2.c
> > > 
> > > (simplified testcase from glibc on PPC{,64}) gives:
> > > ld: BFD 2.15.90 20040312 assertion fail ../../bfd/elflink.c:1391
> > > (on all arches I've tried).
> > > 
> > 
> > This patch works for me.
> 
> Why can't we just remove the assert?  Seems to me that the assert is
> demonstrably wrong.

It may catch other bugs.


H.J.



More information about the Binutils mailing list