gcc-3.0.3 - collect2 passes o_file in ld2_argv too early in some cases.

Gareth Pearce tilps@hotmail.com
Wed Feb 20 00:46:00 GMT 2002


Hi

my gcc -v output is
Reading specs from 
/home/gareth/lib/gcc-lib/alphaev56-dec-osf4.0d/3.0.3/specs
Configured with: ../gcc-3.0.3/configure --prefix=/home/gareth
Thread model: single
gcc version 3.0.3

I am fairly sure this bug is mostly platform independent, from my read of 
collect2.c there is no special handling of the -soname option.
This means that if collect2 is called with -soname blah.so and no 
objects/libraries/shared objects/-l'libname'/ are members of the argument 
list before the -soname - the o_file variable gets added to ld2_argv just 
before blah.so
thus soname=o_file but more importantly - blah.so is now listed as an object 
as far as ld is concerned - and since thats what its makeing - and therefore 
it cant find it - it dies.

Fix - set a flag if -soname found
If that flag set - unset first_file for the body of the loop - reset 
first_file and unset flag at end of loop.

or something similar.

Hope this helps,

Gareth

PS I am not subscribed - CC me if relevent.

_________________________________________________________________
Join the worldÂ’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com



More information about the Gcc-bugs mailing list