[GCC 3.0] libjava code emits code that confuses as/ld

Alexandre Oliva aoliva@redhat.com
Fri Jul 27 02:12:00 GMT 2001


On Jul  9, 2001, Marc Espie <espie@schutzenberger.liafa.jussieu.fr> wrote:

> Compiling Boolean.c in pic mode ends up with the following code:
> The issue here is movl	LLSDA0@GOT(%ebx), %eax.

> OpenBSD as emits a warning:
> Boolean.s: Assembler messages:
> Boolean.s:768: Warning: GOT relocation burb: `LLSDA0' should be global

Even though it is true that this could have been assembled as:

        leal    LLSDA0@GOTOFF(%ebx), %eax

there's nothing inherently wrong with asking for a @GOT entry of a
local symbol, AFAIK.  Is there any reason why the OpenBSD assembler
cannot accept this construct, and the linker and dynamic linker behave
correctly in its presence, even if GCC is eventually changed so as to
generate the more efficient relocation?

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me



More information about the Gcc-bugs mailing list