This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A very "strange" bug in gcc 2.96
- To: "Eric W. Biederman" <eric at biederman dot org>
- Subject: Re: A very "strange" bug in gcc 2.96
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Mon, 22 May 2000 12:00:15 +1000 (EST)
- cc: "H . J . Lu" <hjl at lucon dot org>, egcs at egcs dot cygnus dot com, binutils at sourceware dot cygnus dot com
On 21 May 2000, Eric W. Biederman wrote:
> "H . J . Lu" <hjl@lucon.org> writes:
>
> > There is the ia32 asm ouput from gcc 2.96 with -O2. Please notice that
> >
> > jmp foo
> >
> > is generated, instead of
> >
> > call foo
> > leave
> > ret
> >
> > It is ok if foo () is a static function. But for extern, they are
> > not the same. The GNU linker supports shared libraries even without
> > -fPIC. With "jmp foo", it doesn't work anymore. If it is intentional,
> > we should declare PIC is required for building shared libraries.
> > Personally, I don't like compiler does this behind my back. It took
> > me several days to figure out why things stopped working.
> >
> > Thanks.
>
> What would need to change with gnu as and gnu ld to cause this to work?
> Is it simply that as needs to emit a location record when jumping
> to labels declared .globl?
For x86, gas/config/tc-i386.c:md_estimate_size_before_relax needs to be
taught how to handle this case properly. (I think that's all that's
needed...)
--
Linuxcare. Support for the Revolution.