This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [GCC 3.0] libjava code emits code that confuses as/ld
On Fri, Jul 27, 2001 at 06:12:17AM -0300, Alexandre Oliva wrote:
> 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?
Yes, there is something wrong.
GOT make symbols visible. There are too many things to WRITE to make this
work with a.out binaries. The linker does not behave correctly. I don't
think it even has a notion of local symbol with GOT.