Date: Wed, 27 Apr 2005 12:21:12 -0700 From: Kris Kennaway <kris@obsecurity.org> To: Michael Hopkins <michael.hopkins@hopkins-research.com> Cc: "freebsd-amd64@freebsd.org" <freebsd-amd64@freebsd.org> Subject: Re: Shared library relocation R_X86_64_32 solution on amd64? Message-ID: <20050427192112.GA30646@xor.obsecurity.org> In-Reply-To: <BE9518AB.38FC5%michael.hopkins@hopkins-research.com> References: <BE9518AB.38FC5%michael.hopkins@hopkins-research.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 27, 2005 at 10:23:39AM +0100, Michael Hopkins wrote: >=20 >=20 > Hi all >=20 > I have been doing some research about why gnustep-base won't link on amd6= 4. > It seems as if the problem I am getting here is quite common. > ------------------------------------------------------------------------ > gmake[1]: Leaving directory > `/usr/home/mwh/Coding/Obj-C/gnustep/core/base/Source' > Making all in SSL... > gmake[1]: Entering directory > `/usr/home/mwh/Coding/Obj-C/gnustep/core/base/SSL' > Making all for bundle SSL... > Creating SSL.bundle/amd64/freebsd/gnu-gnu-gnu... > Compiling file GSSSLHandle.m ... > Linking bundle SSL ... > /usr/bin/ld: /usr/lib/libobjc.a(Protocol.o): relocation R_X86_64_32 can n= ot > be used when making a shared object; recompile with -fPIC > /usr/lib/libobjc.a: could not read symbols: Bad value > gmake[2]: *** [SSL.bundle/amd64/freebsd/gnu-gnu-gnu/SSL] Error 1 > gmake[1]: *** [SSL.all.bundle.variables] Error 2 > gmake[1]: Leaving directory > `/usr/home/mwh/Coding/Obj-C/gnustep/core/base/SSL' > gmake: *** [internal-all] Error 2 > ------------------------------------------------------------------------ >=20 > It has been mentioned a few times on this list: my understanding of this > issue is that you can't link to shared libraries unless they have been > compiled with -fPIC. Is that right? Yes, and libobjc.a isn't a shared library, so you can't link it into one. > continue. >=20 > I have two main questions in this post. >=20 > 1) What installs libobjc.a? I want to reinstall it with CFLAGS +=3D -fPI= C. I > assumed that it was installed by gcc-objc but after reinstalling that with > -fPIC the libobjc.a library was untouched! Since it's in /usr/lib, it's part of the base system. We don't seem to install a shared library version of that, so you should talk to kan@. > 2) What is the standard method for dealing with this problem on amd64? I= 'm > sure it will hit a lot of people on many different ports and if it's a ti= er > 1 platform then don't we need to have a proper strategy for dealing with > this? Well, yeah, there is a proper strategy. "Link shared objects to shared libraries". Kris --W/nzBZO5zC0uMSeA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCb+YoWry0BWjoQKURAnXDAJ0UBlr1rUd1ul1BEbOlOV8Nk2hX/gCg5S7l /dvni2iosRpVLqfJS+rPGXg= =3m40 -----END PGP SIGNATURE----- --W/nzBZO5zC0uMSeA--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050427192112.GA30646>