From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.redhat.com (Postfix) with ESMTP id E52C44043F for ; Thu, 14 Nov 2002 08:02:00 -0500 (EST) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id gAED20c19917 for axp-list@listman.redhat.com; Thu, 14 Nov 2002 08:02:00 -0500 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id gAED20D19893 for ; Thu, 14 Nov 2002 08:02:00 -0500 Received: from skarpsey.dyndns.org (12-237-135-160.client.attbi.com [12.237.135.160]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id gAECcYw23050 for ; Thu, 14 Nov 2002 07:38:35 -0500 Received: from valhalla (Valhalla.attbi.com [192.168.0.2]) by skarpsey.dyndns.org (8.12.6/8.12.5) with ESMTP id gAECuulm026495 for ; Thu, 14 Nov 2002 06:56:57 -0600 Content-Type: text/plain; charset="iso-8859-1" From: Kelledin To: axp-list@redhat.com Subject: Re: Shared objects+global variables? Date: Thu, 14 Nov 2002 07:56:56 -0500 User-Agent: KMail/1.4.3 References: <200211132121.28796.kelledin+AXP@skarpsey.dyndns.org> <20021113225527.E19573@twiddle.net> In-Reply-To: <20021113225527.E19573@twiddle.net> MIME-Version: 1.0 Message-Id: <200211140656.56074.kelledin+AXP@skarpsey.dyndns.org> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by int-mx1.corp.redhat.com id gAED20D19893 X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: 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?"