public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* target/8569: gcc on alpha does not support global variables in shared objects
@ 2002-11-20 7:00 kelledin
0 siblings, 0 replies; 4+ messages in thread
From: kelledin @ 2002-11-20 7:00 UTC (permalink / raw)
To: gcc-gnats
>Number: 8569
>Category: target
>Synopsis: gcc on alpha does not support global variables in shared objects
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Nov 13 17:16:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: kelledin@users.sourceforge.net
>Release: gcc-3.2
>Organization:
>Environment:
>Description:
The toolchain (I suspect gcc in particular) is unable to support shared objects where the code makes references to global variables in the same shared object. In short, when the code references one of its global variables, gcc generates a gp-relative relocation in the resulting assembly language. When trying to link this into a shared object, ld notices this gp-relative relocation and refuses to link.
FYI, I'm also using binutils-2.13, plus glibc-2.2.5.
>How-To-Repeat:
Attempt to build a shared object with the following code segment:
--------
#include <stdio.h>
int num=1;
int func()
{
printf("%d\n", num);
return 0;
}
--------
>Fix:
none known
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: target/8569: gcc on alpha does not support global variables in shared objects
@ 2002-11-20 18:03 bangerth
0 siblings, 0 replies; 4+ messages in thread
From: bangerth @ 2002-11-20 18:03 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, kelledin, nobody
Synopsis: gcc on alpha does not support global variables in shared objects
State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Thu Nov 14 07:19:03 2002
State-Changed-Why:
Closed on request of submitter. See
http://gcc.gnu.org/ml/gcc-bugs/2002-11/msg00618.html
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8569
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: target/8569: gcc on alpha does not support global variables in shared objects
@ 2002-11-20 17:56 Kelledin
0 siblings, 0 replies; 4+ messages in thread
From: Kelledin @ 2002-11-20 17:56 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR target/8569; it has been noted by GNATS.
From: Kelledin <kelledin@skarpsey.dyndns.org>
To: kelledin@users.sourceforge.net, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org
Cc:
Subject: Re: target/8569: gcc on alpha does not support global variables in shared objects
Date: Thu, 14 Nov 2002 08:13:54 -0500
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=3Dview%20audit-trail&database=3D=
gcc&pr=3D8569
Gah...never mind.
I just recompiled gcc, and the problem mysteriously went away.
I'm not sure how that fixed it, and I'm not sure I want to look a=20
gift-horse in the mouth. In the meantime, I suggest we just=20
close this bug report...
--=20
Kelledin
"If a server crashes in a server farm and no one pings it, does=20
it still cost four figures to fix?"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: target/8569: gcc on alpha does not support global variables in shared objects
@ 2002-11-20 8:46 Glen Nakamura
0 siblings, 0 replies; 4+ messages in thread
From: Glen Nakamura @ 2002-11-20 8:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR target/8569; it has been noted by GNATS.
From: Glen Nakamura <glen@imodulo.com>
To: kelledin@users.sourceforge.net, gcc-gnats@gcc.gnu.org,
gcc-bugs@gcc.gnu.org
Cc:
Subject: Re: target/8569: gcc on alpha does not support global variables in shared objects
Date: Wed, 13 Nov 2002 22:23:30 -1000
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8569
I remember running into this "gp-relative relocation" problem before...
Compiling with "-mno-explicit-relocs" seemed to get things working, so
I didn't investigate any further. Hopefully, someone with a better
understanding can provide you with a proper solution.
- glen
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-11-14 15:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-20 7:00 target/8569: gcc on alpha does not support global variables in shared objects kelledin
2002-11-20 8:46 Glen Nakamura
2002-11-20 17:56 Kelledin
2002-11-20 18:03 bangerth
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).