public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* other/5762: collect2 passes o_file too soon if -soname option is passed early.
@ 2002-02-23 16:46 tilps
  0 siblings, 0 replies; only message in thread
From: tilps @ 2002-02-23 16:46 UTC (permalink / raw)
  To: gcc-gnats


>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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-02-24  0:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-23 16:46 other/5762: collect2 passes o_file too soon if -soname option is passed early tilps

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).