From owner-freebsd-ia64 Mon Mar 10 15:13:29 2003 Delivered-To: freebsd-ia64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 027D437B401; Mon, 10 Mar 2003 15:13:28 -0800 (PST) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D8C443F3F; Mon, 10 Mar 2003 15:13:26 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from athlon.pn.xcllnt.net (athlon.pn.xcllnt.net [192.168.4.3]) by ns1.xcllnt.net (8.12.8/8.12.8) with ESMTP id h2ANDQSd041397; Mon, 10 Mar 2003 15:13:26 -0800 (PST) (envelope-from marcel@piii.pn.xcllnt.net) Received: from athlon.pn.xcllnt.net (localhost [127.0.0.1]) by athlon.pn.xcllnt.net (8.12.8/8.12.8) with ESMTP id h2ANDQH0001191; Mon, 10 Mar 2003 15:13:26 -0800 (PST) (envelope-from marcel@athlon.pn.xcllnt.net) Received: (from marcel@localhost) by athlon.pn.xcllnt.net (8.12.8/8.12.8/Submit) id h2ANDQGe001190; Mon, 10 Mar 2003 15:13:26 -0800 (PST) (envelope-from marcel) Date: Mon, 10 Mar 2003 15:13:26 -0800 From: Marcel Moolenaar To: Arun Sharma Cc: freebsd-ia64@FreeBSD.ORG, FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: ia64/49081: @gprel relocation against dynamic symbol in /usr/lib/libobjc.a Message-ID: <20030310231326.GA1156@athlon.pn.xcllnt.net> References: <200303102150.h2ALo7Pl050754@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.3i Sender: owner-freebsd-ia64@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, Mar 10, 2003 at 02:53:25PM -0800, Arun Sharma wrote: > Marcel Moolenaar writes: > > > > Linking bundle SSL ... > > > /usr/bin/ld: /usr/lib/libobjc.a(objects.o): @gprel relocation against dynamic symbol _objc_object_alloc > > > /usr/bin/ld: /usr/lib/libobjc.a(objects.o): @gprel relocation against dynamic symbol _objc_object_copy > > > /usr/bin/ld: /usr/lib/libobjc.a(objects.o): @gprel relocation against dynamic symbol _objc_object_dispose > > It seems to be by design: > > # pwd > /usr/src/gnu/lib/libobjc > # grep NOPIC Makefile > NOPIC= works but method lookup slowdown is significant > Yes, hence my question. We cannot easily change this without affecting other platforms (assuming for a moment we're not going to create an ia64 specific kludge -- not gratuitously that is). At this time the port is broken for all platforms, because of the fundamental flaw of linking in non-PIC code in a shared library. The fact that it happens to work on some architectures does not mean it's not broken. So, either we change the way we build libobjc.a, or we provide a libobjc_pic.a just like we do for libc.a, or we create a libobjc.so. For the last two cases the port has to be changed. For the first case it pessimizes the library (performance-wise) for the complete (or fully archive) programs. I think the best solution is to build libobjc.a with -fpic. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ia64" in the body of the message