[Top] [All Lists]

Re: ld: non-dynamic relocations refer to dynamic symbol

To: Luk Claes <>
Subject: Re: ld: non-dynamic relocations refer to dynamic symbol
From: Kevin Cernekee <>
Date: Sat, 30 May 2009 11:32:08 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=Jf2AbPEWO6oUa8ja/IUFVdrtdO6tGMP5GuGahWyTV9U=; b=aSqX2NThb6wwGdgt+rEr8/wz94dQZd6BXjcaHcK+7BABP0Y/rQr918vxzb0i2bOFXp ZjaeTfmK8B01OFtzpN163Xsf0H1s8fDkEPd5Jar4J9lefeczIa0Nju4P3r1azhOeCemj vHKV5yy+7BCpv1ZOc5kspZ04FPsB6sPWuvNGM=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=UOsCRNtZV2aCnaB2VFr3KyfkEhoDg5HeETltTxHNBSaEBa79oWaN2Ff2MT43iFnNVj kkl/6O3hsFqfF6w+VUv4p9EkOBid6nE4lT/pfJTnfe8R/DU9XFIIYm+/h8xsPuQ5IRYV Ijr0OzTHUhbTgY0IWGPY8BMCXeeTlTMnkRjqA=
In-reply-to: <>
Original-recipient: rfc822;
References: <>
On Sat, May 30, 2009 at 2:41 AM, Luk Claes <> wrote:
There appears to be a mips specific bug in binutils which make some packages fail to build when linking. More details can be found in debian bug #519006 [0] and binutils upstream bug #10144 [1].

I have seen this error when -fPIC is accidentally omitted from CFLAGS when building shared libraries.

Older versions of MIPS gcc used to implicitly generate PIC code for pretty much all Linux executables and libraries, so if you forgot to add -fPIC it usually worked anyway.  But with the addition of PLT support this is no longer the case.  MIPS gcc now defaults to non-PIC code, which is more efficient and easier to read in the disassembly.  The downside is that all of the old broken Makefiles need to be fixed.
<Prev in Thread] Current Thread [Next in Thread>