This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

other/5762: collect2 passes o_file too soon if -soname option is passed early.



>Number:         5762
>Category:       other
>Synopsis:       collect2 passes o_file too soon if -soname option is passed early.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 23 16:46:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     tilps@hotmail.com
>Release:        gcc 3.0 branchCVS
>Organization:
>Environment:
alphaev56-dec-osf4.0d - running system binutils.
>Description:
if collect decides it needs to craete a temporary object to add to the link and the -soname <name> option is passed before any objects are listed, the object will be placed in the linker arguments before <name> - causing link to fail.

This appears it should be a crossplatform bug, although i have failed to reproduce it on debian linux and cygwin, because I have been unable to make a testcase to get collect2 on those systems to decide to create a temporary object to add to the link to satisfy the static constrution/destruction.  It does however defeinitely happen on the alpha osf/1 4.0d system.  It makes libxpcom.so linking fail when building mozilla. 
>How-To-Repeat:
Umm - yes ...compiling libxpcom.so from mozilla on OSF/1 alpha causes it, but since my bug fixes for mozilla arent in yet, I cant exactly suggest trying that.  However I think a quick look at the source code should show that my fix is obvious.
>Fix:
The attached file patches gcc/collect2.c from gcc 3.0 branch CVS as of today - and fixes the problem.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="collect2.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="collect2.patch"

SW5kZXg6IGNvbGxlY3QyLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTogL2N2c3Jvb3QvZ2NjL2djYy9n
Y2MvY29sbGVjdDIuYyx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS4xMDcuNC4zCmRpZmYgLXUgLXIx
LjEwNy40LjMgY29sbGVjdDIuYwotLS0gY29sbGVjdDIuYwkyNyBBcHIgMjAwMSAxOTozNzowMyAt
MDAwMAkxLjEwNy40LjMKKysrIGNvbGxlY3QyLmMJMjMgRmViIDIwMDIgMjM6NDk6NTcgLTAwMDAK
QEAgLTEyMTUsNiArMTIxNSw4IEBACiAJCSAgc3RyaXBfZmxhZyA9IDE7CiAJCSAgbGQxLS07CiAJ
CX0KKwkgICAgICBlbHNlIGlmIChzdHJjbXAgKGFyZywgIi1zb25hbWUiKSA9PSAwKQorCQkqbGQx
KysgPSAqbGQyKysgPSAqKythcmd2OwogCSAgICAgIGJyZWFrOwogCiAJICAgIGNhc2UgJ3YnOgoK


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