bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/21896] New: relocation R_X86_64_32S bug in ld version 2.28


From: nicolas.gama at gmail dot com
Subject: [Bug ld/21896] New: relocation R_X86_64_32S bug in ld version 2.28
Date: Thu, 03 Aug 2017 07:40:21 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=21896

            Bug ID: 21896
           Summary: relocation R_X86_64_32S bug in ld version 2.28
           Product: binutils
           Version: 2.28
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: nicolas.gama at gmail dot com
  Target Milestone: ---

Created attachment 10312
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10312&action=edit
minimal code to reproduce the bug

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).

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]