From: Kelledin <kelledin+AXP@skarpsey.dyndns.org>
To: axp-list@redhat.com
Subject: Re: Shared objects+global variables?
Date: Thu, 14 Nov 2002 07:56:56 -0500 [thread overview]
Message-ID: <200211140656.56074.kelledin+AXP@skarpsey.dyndns.org> (raw)
In-Reply-To: <20021113225527.E19573@twiddle.net>
On Thursday 14 November 2002 12:55 am, Richard Henderson wrote:
> On Wed, Nov 13, 2002 at 10:21:28PM -0500, Kelledin wrote:
> > ... whenever I try to compile a library that does this,
> > ld complains about "gp-relative relocations" and refuses to
> > link.
>
> You MUST use -fpic or -fPIC.
I did that, no luck; it was one of the first things I tried.
Also tried -mno-explicit-relocs. =( Now I'm starting to think
binutils is responsible...
> > Is this normal on alpha platforms?
>
> Yes. And IA-64, and Sparc, and PPC, and ...
>
> > It's most certainly not normal on x86...
>
> They got lucky.
I understand that -fPIC isn't quite so necessary on x86 (I still
specify it anyways). This global variable convention needs to
be supported, seeing as common apps like Linux-PAM rely on it.
--
Kelledin
"If a server crashes in a server farm and no one pings it, does
it still cost four figures to fix?"
next prev parent reply other threads:[~2002-11-14 13:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-14 3:21 Shared objects+global variables? Kelledin
2002-11-14 6:55 ` Richard Henderson
2002-11-14 12:56 ` Kelledin [this message]
2002-11-14 13:11 ` Kelledin
2002-11-14 21:37 ` Ted Goodridge
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox