This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bad ia32 patch breaks PIC (Re: Strange PIC code on ia32 since Aug. 29.)
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Bad ia32 patch breaks PIC (Re: Strange PIC code on ia32 since Aug. 29.)
- From: "H . J . Lu" <hjl at valinux dot com>
- Date: Fri, 1 Sep 2000 21:20:26 -0700
- Cc: rth at cygnus dot com
- References: <20000901191717.A27744@valinux.com>
On Fri, Sep 01, 2000 at 07:17:17PM -0700, H . J . Lu wrote:
> For several days, I have been getting many libio "make check" failures
> from CVS under ia32. I used "-O2 -mcpu=pentiumpro -march=pentiumpro" to
> compile gcc. I found out for such a simple code, I got
>
> # /work/build/gnu/bin/gcc-3.0/gcc/xgcc -B/work/build/gnu/bin/gcc-3.0/gcc/ -O2 -fpic -S foo.c
> # cat foo.s
> .file "foo.c"
> .version "01.01"
> gcc2_compiled.:
> .text
> .align 16
> .globl foo
> .type foo,@function
> foo:
> pushl %ebp
> movl %esp, %ebp
> subl $8, %esp
> call bar@PLT
> movl %ebp, %esp
> popl %ebp
> ret
> .Lfe1:
> .size foo,.Lfe1-foo
> .ident "GCC: (GNU) 2.96 20000901 (experimental)"
> #
>
> It doesn't look like PIC code at all. Did I do something wrong? Could
> someone please try "-O2 -fpic -S" on the code enlsed here under ia32
> with the gcc in CVS after Aug. 29 and send me the asm output?
>
> Thanks.
>
>
> --
> H.J. Lu (hjl@gnu.org)
> ---
> foo ()
> {
> bar ();
> }
Back out this patch
http://gcc.gnu.org/ml/gcc-patches/2000-08/msg01201.html
fixes PIC under ia32.
--
H.J. Lu (hjl@gnu.org)