This is the mail archive of the binutils@sourceware.org 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: differences in generated ldscripts for native and cross builds


On Sun, Dec 06, 2015 at 09:00:41PM +0100, Thomas Schwinge wrote:
> On Wed, 2 Dec 2015 19:29:51 +1030, Alan Modra <amodra@gmail.com> wrote:
> > I think it's time we defaulted to --enable-initfini-array, at least for
> > binutils-2.27.
> 
> Makes sense to me (only for systems where it's supported, of course).

The macros defined by --enable-initfini-array are HAVE_INITFINI_ARRAY,
which is only used by ld/testsuite/ld-elf/init-mixed.c, and
ENABLE_INITFINI_ARRAY, which is used in ld/scripttempl/nds32elf.sc,
ld/scripttempl/elf.sc, and ld/emulparams/elf_nacl.sh.  Thus we don't
need anything target specific in configure.ac:  Non-ELF targets won't
be affected by the change.

Where we might get into trouble is on systems that use old startup
files lacking code to call constructor function pointers in
.init_array.  For glibc that means 2002 vintage code, I think.

-- 
Alan Modra
Australia Development Lab, IBM


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