On Fri, Aug 26, 2011 at 7:45 AM, Rainer Orth <r...@cebitec.uni-bielefeld.de> wrote: > "H.J. Lu" <hjl.to...@gmail.com> writes: > >>> 2011-08-26 Rainer Orth <r...@cebitec.uni-bielefeld.de> >>> >>> PR target/50166 >>> * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Check count in main. >>> * configure: Regenerate. >> >> That explains why init_array was enabled on AIX. It looks good to me and >> still works on Fedora 15. > > What support do you need on the Linux side for .init_array/.fini_array > to work? I'd have expected that gld 2.21 is enough, or is ld-linux.so.2 > support required, too?
You need the latest Linux binutils. Mixing init_array/,ctors sections support was added after binutils 2.21 was released: http://sourceware.org/git/?p=binutils.git;a=commit;h=30dfd0308a8551174634494822e194fcf24a7ddb -- H.J.