[patch] init_array/fini_array support

Joseph S. Myers joseph at codesourcery.com
Thu Jan 19 17:39:03 UTC 2006


On Thu, 19 Jan 2006, Peter S. Mazinger wrote:

> > (I'm presuming old apps don't use init_array / fini_array / preinit_array.  
> > If they do, none of those functions will previously have been called; 
> > after an upgrade of the shared uClibc, the app's preinit_array and shared 
> > libraries' init_array and fini_array will start getting called, but the 
> > app's init_array and fini_array won't get called without relinking.)
> 
> I recall seeing support in binutils for these? Should binutils been 
> rebuilt after changing uClibc to have full support?

Support appears to have been added by

2002-03-04  H.J. Lu <hjl at gnu.org>

        * scripttempl/elf.sc: Put .preinit_array, .init_array and
        .fini_array in the data segment.

2002-03-04  Alan Modra  <amodra at bigpond.net.au>

        * scripttempl/elf.sc: Correct syntax errors in 2002-03-01 commit.

2002-03-01  David Mosberger  <davidm at hpl.hp.com>

        * scripttempl/elf.sc (SECTIONS): Add entries for .preinit_array,
        .init_array, and .fini_array.

so any version from nearly the past four years should be OK.  In any case, 
binutils build doesn't look for library features so there is no need to 
rebuild binutils if you have a suitable version, i.e. 2.12.1 or later (the 
changes were after 2.12 branched but merged into 2.12.1).

-- 
Joseph S. Myers
joseph at codesourcery.com



More information about the uClibc mailing list