delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/04/07/04:45:28

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=srIIhjUfIPgc3RnobMUy6J5HIoURwb9or50fhd+E3679CXaebOax5
fH1YQILY8BYhDXhhzEE2tc85/e8qteaXs6rAQc6aGakzKlPOsdKZ49FnoxypNzfR
bac7DVBmRKfBv4L2fimJAHlzm2c8Dn2+ZJF3SzCdozyxvbIGvhMwaY=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=GFEO7xo5u8vMghHkcp6JW9d4IAI=; b=q4U+7uR/iKzpEUxbvqsdF8IzkzMZ
InieTnvLmAyNDluyOieenAvOb1XOIWu5K0Cf+2p631jZLRYvdvuMj2J/AhgQ/exI
9k8AcWQbNOkmzlTxVrVb0a15VNBC6XQVOfAwZoA4yKJZFVrAeU2TfYewhNI5K4je
HZWbOCwxLgLj5K4=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Mon, 7 Apr 2014 10:45:10 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `len'
Message-ID: <20140407084510.GB2061@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <alpine DOT LFD DOT 2 DOT 03 DOT 1404050922190 DOT 20917 AT KarmannGhia DOT org>
MIME-Version: 1.0
In-Reply-To: <alpine.LFD.2.03.1404050922190.20917@KarmannGhia.org>
User-Agent: Mutt/1.5.21 (2010-09-15)

--PmA2V3Z32TCmWXqI
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Apr  5 09:51, Richard wrote:
>=20
> Hello Everyone,
>=20
> I recently (two weeks ago or so) upgraded the cygwin installation on
> an XP 64 bit (corp edition) box and in getting things running on it
> again I've been having various troubles, even though I was VERY
> careful to watch for any installation errors - none were noticed.
> Normally I don't do development on this box but copy over from other
> systems. I had at least one program that was not behaving correctly
> - it would apparently hide output sent to stdout among other
> mysteries. After fiddling with things I decided to just rebuild on
> that box from sources - it's almost all gnu c. (Note that this code
> needs to run unchanged on many different platforms.)
>=20
> At some point I get to the gcc call to bind together three object
> files into an executable - all the object files having just been
> built with zero errors - and I get this particular "undefined
> reference to `len'" error. Of course I went hunting for the use of
> 'len' - which is a pretty absurd effort as a simple grep matches on
> coutless noise such as 'filename' or 'strlen', etc. However, a
> thorough search revealed no uses of just 'len', yet I don't deny I
> could possibly have overlooked it. Even so, this directory was taken
> wholesale from a 64 bit system (Win 7) with an older cygwin
> installation where the code compiles and runs fine. So somehow I
> don't think it's actually in my code but rather a library reference
> problem somehow.
>=20
> The specific set of error output from make is:
>=20
> $ gcc -o ctjc.exe ctjc.o hashc.o sha1.o;
> ctjc.o:ctjc.c:(.text+0x2287): undefined reference to `len'
> ctjc.o:ctjc.c:(.text+0x2287): relocation truncated to fit:
> R_X86_64_PC32 against undefined symbol `len'
> /usr/bin/ld: ctjc.o: bad reloc address 0x0 in section `.pdata'
> /usr/bin/ld: final link failed: Invalid operation
> collect2: error: ld returned 1 exit status
>=20
> Any assistance greatly appreciated.

As I outlined in other mail to this list just a couple of days ago,
the "relocation truncated to fit" stuff is a red herring.  It's just
a side-effect of the way addressing and relocation on x86_64 works.

The important part of the message is the first one: undefined reference
to `len'.  That's what you have to look for.


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--PmA2V3Z32TCmWXqI
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJTQmWWAAoJEPU2Bp2uRE+g4b4P/2BwImnJL9z70H+JFb1jEp4+
ImJ2zd1Gi1WOf5axR3KmcEV7iU1uXfAB5LGjIw+YYhz+S8pSBKQAL8el23c4BxaD
a1clN6q0SbrMA6bI3g3gFrEOfH/K0pbz242jYcbbZAUAqugVVWKapOhgPPSmqQGF
TaD+bay+opec3B7HY1153SDhoUmQakCmPl7eZGdnawHK6Odt7njQ2cBdK0fpILij
wNcJfOyYMkRy85/9X2J3niIvdXrvsj217J4/LsdpsW558LytWzQ7/IGYlm6Hdxns
4OQbTJOKLb1lB8qM+/8a/sorGdSlk0d9vugMkHgNT+lbpNbYXvA7oL8Y1w++rhGo
jFeRaV9YuFnalyeBPK57eW475Ahp56i2Y+1ErR00PBqDk0N3EBki54j4rl3oMfv8
P9Md/ZWRilUOA3xKsMKT2HBBT46o4gY4334R2CBTUhltxTkEa87FroGOBO0R1Ewb
l3AQ+AmeB5CtZgeijGQsvR4FuIROIXhQWrTDmmMNqVNEJooLjHU+jOBkSwITkGPl
UojZNNavwb8yITok4rMCAXmHHAuFOtWZYtmqMhcuXOjNhL6PaApGpzC0FNoAM1mf
5CctcYzQqghRplXw0AQBZ/3Fp3nknfi/W7wLgmD7/pxALejbaJ+pd8RVavDDW0zk
I1A1yH77G53UpEhTFFIe
=kRzu
-----END PGP SIGNATURE-----

--PmA2V3Z32TCmWXqI--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019