Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.utils.bug > #2213

relocation R_X86_64_32S bug in ld version 2.28

Path csiph.com!weretis.net!feeder6.news.weretis.net!news.glorb.com!usenet.stanford.edu!not-for-mail
From Nicolas Gama <nicolas.gama@gmail.com>
Newsgroups gnu.utils.bug
Subject relocation R_X86_64_32S bug in ld version 2.28
Date Wed, 2 Aug 2017 17:58:09 +0200
Lines 63
Approved bug-gnu-utils@gnu.org
Message-ID <mailman.12397.1501878040.21957.bug-gnu-utils@gnu.org> (permalink)
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type multipart/mixed; boundary="------------8A2D11CDF3502104C70B1F82"
X-Trace usenet.stanford.edu 1501878040 8711 208.118.235.17 (4 Aug 2017 20:20:40 GMT)
X-Complaints-To action@cs.stanford.edu
To bug-gnu-utils@gnu.org
Envelope-to bug-gnu-utils@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version; bh=cFeuhNjzigzv2hnIAg7SxkJQNGqOeg7FsrQVAt+YGi0=; b=tys15CHVhhTWGqRlhhV5t8Y6TGYqBFbCzcA0DQlA51qJjTPwqNnqFBsorikuEwy4SN YwL3J2lXWnMbkwfKR6n5iVfFChX7d8IgubJJjWDE0NCtQniScMksA5JZweqMcOIO38/n +Cygv44is3hASgay0d5hD9kEq6heAKrZBNnQNOU90CjLcZ9tiWwfUA7d25D4cKscSfrx jYJO/gRoAzvl82QsxagZrm9PRJH4Ys7amM1ZrIi8NLMD1WdffIJfkm0rXFCCz5l3r9I6 Y+bHHiAeJG4eFiWD9xW/wDfBuD6wjg/s024Qqkqd9X2VQB86qx02VhM3tDlsiCH1J4T3 Rnqw==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version; bh=cFeuhNjzigzv2hnIAg7SxkJQNGqOeg7FsrQVAt+YGi0=; b=VFNpduE0UxKGBhWe6eVMvbH78U1l1MyCHxpPMiypW8q9gsVvGwd15vDFV0h1OnqkIO 6HXZbdvjkHhRpFZRkGJ5ZNZ7s2bFpcqS6GIFFH1fmyd5+IusfS6SJKrHBjChhOhLAvqG V62U0yxgO3efkcHoWKaB3bf9GyTwOg9zK5P4Yu2vCL9SMR8yG0fo15htMh1oNX3+C8mN Nha4P7Yks7tluQjT4lvcWRqateBoO51an7JWSDh4xap+4sdcETz94i9zo8jZy2T24sC8 rOaQXAsIjBS0OV6P8r7DAkW6ZbIVhxcPuWBG+fu7B61KrFY5oWOF6zayHiKOQKZXhfEn WRuQ==
X-Gm-Message-State AIVw1122qjq7se9GgFtf4zXWFWY8YUAO1t1I4MRk86SUU/c0gRiqeeZf DLkfCobZZq72VWg4R/4=
X-Received by 10.80.145.38 with SMTP id e35mr22276243eda.8.1501689490971; Wed, 02 Aug 2017 08:58:10 -0700 (PDT)
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
X-detected-operating-system by eggs.gnu.org: Genre and OS details not recognized.
X-Received-From 2a00:1450:400c:c09::22a
X-Mailman-Approved-At Wed, 02 Aug 2017 12:49:30 -0400
X-BeenThere bug-gnu-utils@gnu.org
X-Mailman-Version 2.1.21
Precedence list
List-Id Bug reports for the GNU utilities <bug-gnu-utils.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-gnu-utils>, <mailto:bug-gnu-utils-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-gnu-utils/>
List-Post <mailto:bug-gnu-utils@gnu.org>
List-Help <mailto:bug-gnu-utils-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-gnu-utils>, <mailto:bug-gnu-utils-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.utils.bug:2213

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

A regression appeared with ld version 2.28:

When trying to link the following assembly program (with any version of
gcc, x86_64 platform)

---------------- a.s -----------------------

.globl toto
toto:
        movq tata,%rax #trying to reference a constant
        ret

tata:
.quad   42

--------------------------------------------

The linker ld fails with the following error, even when linking a
regular a.out binary (not a shared object):

/usr/bin/ld: a.o: relocation R_X86_64_32S against `.text' can not be
used when making a shared object; recompile with -fPIC


Normally, this error should only occur when trying to create a shared
object, but since 2.28, the error appears even for regular binaries,
which is wrong.


version 2.26 of ld managed to compile the program correctly (for
instance on Ubuntu Xenial).


Enclosed is a minimal program to reproduce the bug. (toto() function
should return 42, and main should print it).


Thanks in advance,

Nicolas

Back to gnu.utils.bug | Previous | Next | Find similar


Thread

relocation R_X86_64_32S bug in ld version 2.28 Nicolas Gama <nicolas.gama@gmail.com> - 2017-08-02 17:58 +0200

csiph-web