Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.utils.bug > #2213
| From | Nicolas Gama <nicolas.gama@gmail.com> |
|---|---|
| Newsgroups | gnu.utils.bug |
| Subject | relocation R_X86_64_32S bug in ld version 2.28 |
| Date | 2017-08-02 17:58 +0200 |
| Message-ID | <mailman.12397.1501878040.21957.bug-gnu-utils@gnu.org> (permalink) |
[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
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