This is the mail archive of the
mailing list for the binutils project.
Re: differences in generated ldscripts for native and cross builds
- From: Alan Modra <amodra at gmail dot com>
- To: Thomas Schwinge <thomas at codesourcery dot com>
- Cc: Joseph Myers <joseph at codesourcery dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, Matthias Klose <doko at debian dot org>, binutils <binutils at sourceware dot org>
- Date: Mon, 7 Dec 2015 09:24:48 +1030
- Subject: Re: differences in generated ldscripts for native and cross builds
- Authentication-results: sourceware.org; auth=none
- References: <5617620A dot 1000207 at debian dot org> <20151009121555 dot GD4434 at bubble dot grove dot modra dot org> <20151011185623 dot GB5535 at vapier dot lan> <CAMe9rOpun+eOzmE=6xMdiGRaZtT-DzAjKy8gEnKwOqw1__Rrug at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1510121659430 dot 6267 at digraph dot polyomino dot org dot uk> <87lhb7aug1 dot fsf at schwinge dot name> <20151202085951 dot GF5966 at bubble dot grove dot modra dot org> <87d1uj4aae dot fsf at hertz dot schwinge dot homeip dot net>
On Sun, Dec 06, 2015 at 09:00:41PM +0100, Thomas Schwinge wrote:
> On Wed, 2 Dec 2015 19:29:51 +1030, Alan Modra <firstname.lastname@example.org> 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.
Australia Development Lab, IBM