bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/20244] ld fails to handle "op $imm, address@hidden"


From: hjl.tools at gmail dot com
Subject: [Bug ld/20244] ld fails to handle "op $imm, address@hidden"
Date: Tue, 14 Feb 2017 19:19:40 +0000

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

--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Dopıng from comment #7)
> Hi.
> 
> It looks like this change breaks the Oracle 12.1 client installation. While
> trying to install the 32-bit Oracle client on a 64-bit SUSE SLES 12 SP2
> machine, we got
> 
> [...]/ld: [...]/product/121/lib/libnls12.a(lxecg2e.o): direct GOT relocation
> R_386_GOT32 against `lxecerr' without base register can not be used when
> making a shared object
> 
> After replacing GNU ld version "GNU ld (GNU Binutils; SUSE Linux Enterprise
> 12) 2.26.1" with the "GNU ld (GNU Binutils; SUSE Linux Enterprise 11)
> 2.21.1" version from an older SLES machine, the Oracle client installation
> worked fine.
> 
> Any idea what the heck Oracle is doing wrong in creating the object files
> for archives like libnls12.a? (These archives have file modification dates
> from 2014, so they’re not build during installation.)

lxecg2e.o contains something like

address@hidden tmp]$ cat x.s
        .globl  bar
        .type   bar, @function
bar:
        movl    address@hidden, %ecx
        movl    (%ecx), %eax
        ret
address@hidden tmp]$ /usr/bin/as --32 -o x.o x.s
address@hidden tmp]$ ld -shared -m elf_i386 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
address@hidden tmp]$

The problem is that since linker doesn't know where the GOT base is at
run-time,
it can't properly resolve R_386_GOT32.

-- 
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]