Red Hat Bugzilla – Bug 1582602
ld should allow "lea foo@GOT, %ecx" [rhel-7.5.z]
Last modified: 2018-06-26 12:52:43 EDT
This bug has been copied from bug #1573872 and has been proposed to be backported to 7.5 z-stream (EUS).
Update N-V-R to use correct z-stream syntax.
Verified with build binutils-2.27-28.base.el7_5.1.x86_64, using the provided reproducer. [root@sheep-30 ~]# gcc -B./ -m32 -c -o x.o x.S [root@sheep-30 ~]# ld -melf_i386 -shared -o libx.so x.o ld: x.o: direct GOT relocation R_386_GOT32 against `foo' without base register can not be used when making a shared object ld: final link failed: Bad value [root@sheep-30 ~]# vs. [root@sheep-30 ~]# gcc -B./ -m32 -c -o x.o x.S [root@sheep-30 ~]# ld -melf_i386 -shared -o libx.so x.o [root@sheep-30 ~]#
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:1994