This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: section .init_array not working on ppc32
On Thu, Mar 13, 2003 at 01:45:12PM +0100, Andreas Schwab wrote:
> Alan Modra <amodra at bigpond dot net dot au> writes:
>
> |> On Thu, Mar 13, 2003 at 11:01:00AM +0100, Olaf Hering wrote:
> |> > I'm not sure if that is a binutils or gcc bug, testcase is from glibc
> |> > configure:
> |> >
> |> > nectarine:~# gcc -o conftest conftest.c -static -nostartfiles -nostdlib
> |> > nectarine:~# ./conftest
> |> > Segmentation fault
> |> > nectarine:~# cat conftest.c
> |> > int _start (void) { return 0; }
> |> > int __start (void) { return 0; }
> |> > int foo (void) { return 1; }
> |> > int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
> |>
> |> It's a glibc configure bug. You can make this obvious by reducing
> |> your conftest.c to just the first line, when the testcase compiles
> |> and links to just
>
> You are not supposed to execute this program. It is only compiled to
> look for existance of init_array support from the compiler.
And this not only for ppc32. I can reproduce it on i586, too.
Elias
--
University of Athens I bet the human brain
Physics Department is a kludge --Marvin Minsky