No .preinit_array/.init_array/.fini_array support?

Nick Clifton nickc@redhat.com
Wed Feb 2 10:17:00 GMT 2005


Hi Franz,

> The following test program from the gcc-3.4.3 configury fails for me on a
> AMD K6 / Suse 7.3 system with binutils-2.15.94.0.2 and gcc-3.4.3 installed:
> 
> configure:8926: checking for .preinit_array/.init_array/.fini_array support
> configure:8947: gcc -o conftest -D_REENTRANT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/local/include/ncurses -pipe -pthread -O2 -fexpensive-optimizations -ffast-math -march=k6 -m3dnow -mmmx -D_REENTRANT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/local/include/ncurses  conftest.c  >&5
> configure:8950: $? = 0
> configure:8952: ./conftest
> configure:8955: $? = 255
> configure: program exited with status 255
> 
> static int x = -1;
> int main (void) { return x; }
> int foo (void) { x = 0; }
> int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
> 
> Is this to be expected in this configuration (i assumed otherwise)?

This test should pass, so there is a bug somewhere.  Not sure where 
though.  It would be interesting to know if the test passes when 
compiled without any optimisation options.

Cheers
   Nick




More information about the Binutils mailing list