This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: No .preinit_array/.init_array/.fini_array support?

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- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]