From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 870 invoked by alias); 2 Mar 2005 17:13:22 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 32440 invoked from network); 2 Mar 2005 17:13:04 -0000 Received: from unknown (HELO rwcrmhc12.comcast.net) (216.148.227.85) by sourceware.org with SMTP; 2 Mar 2005 17:13:04 -0000 Received: from lucon.org ([24.6.212.230]) by comcast.net (rwcrmhc12) with ESMTP id <2005030217130301400hobp0e>; Wed, 2 Mar 2005 17:13:03 +0000 Received: by lucon.org (Postfix, from userid 1000) id 13A2797F22; Wed, 2 Mar 2005 09:13:03 -0800 (PST) Date: Wed, 02 Mar 2005 17:13:00 -0000 From: "H. J. Lu" To: Matthew L Daniel Cc: binutils@sourceware.org Subject: Re: relocation R_X86_64_PC32 and shared libraries Message-ID: <20050302171302.GA21620@lucon.org> References: <20050302164523.GA11892@cafebabe.intra> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050302164523.GA11892@cafebabe.intra> User-Agent: Mutt/1.4.1i X-SW-Source: 2005-03/txt/msg00081.txt.bz2 On Wed, Mar 02, 2005 at 11:45:23AM -0500, Matthew L Daniel wrote: > I am running Fedora Core 3 (x86_64) with: > gcc (GCC) 3.4.3 20050124 (Red Hat 3.4.3-17) > (I've also tried with gcc4 (GCC) 4.0.0 20050125 (Red Hat 4.0.0-0.22)) > GNU ld version 2.15.95 20050302 (cvs update as of this morning) > glibc-devel-2.3.4-2.fc3 > > When I try and compile Mozilla from CVS, I get the following error: > > > gcc -shared -Wl,-soname -Wl,libnspr4.so -o libnspr4.so [lots of o files] > ... > > /usr/bin/ld: io/./priometh.o: relocation R_X86_64_PC32 against > > `memcpy@@GLIBC_2.2.5' can not be used when making a shared object; > > recompile with -fPIC > > /usr/bin/ld: final link failed: Bad value > > It WAS compiled with "-pipe -ansi -Wall -pthread -O2 -fPIC" > and a bunch of Mozilla defines. > > $ file io/./priometh.o > io/./priometh.o: ELF 64-bit LSB relocatable, AMD x86-64, version 1 (SYSV), not stripped > $ nm io/./priometh.o | grep memcpy > U memcpy > I don't think it a linker problem. Send me a preprocessed priometh.cc and compiler flags used to compile it. I will take a look. H.J.