Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Mar 2003 15:20:07 -0800 (PST)
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        freebsd-ia64@FreeBSD.org
Subject:   Re: ia64/49081: @gprel relocation against dynamic symbol in /usr/lib/libobjc.a
Message-ID:  <200303102320.h2ANK7lW077103@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ia64/49081; it has been noted by GNATS.

From: Marcel Moolenaar <marcel@xcllnt.net>
To: Arun Sharma <arun.sharma@intel.com>
Cc: freebsd-ia64@FreeBSD.ORG, FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: ia64/49081: @gprel relocation against dynamic symbol in /usr/lib/libobjc.a
Date: Mon, 10 Mar 2003 15:13:26 -0800

 On Mon, Mar 10, 2003 at 02:53:25PM -0800, Arun Sharma wrote:
 > Marcel Moolenaar <marcel@xcllnt.net> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303102320.h2ANK7lW077103>