This is the mail archive of the
binutils@sourceware.org
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: Matthias Klose <doko at debian dot org>
- Cc: binutils <binutils at sourceware dot org>
- Date: Fri, 9 Oct 2015 22:45:55 +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>
On Fri, Oct 09, 2015 at 08:43:22AM +0200, Matthias Klose wrote:
> --- debian/tmp/usr/lib/ldscripts/aarch64elf.x
> +++ debian/binutils-aarch64-linux-gnu/usr/lib/ldscripts/aarch64elf.x
> @@ -93,15 +93,15 @@
> .init_array :
> {
> PROVIDE_HIDDEN (__init_array_start = .);
> - KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
> - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o
> *crtend?.o ) .ctors))
> + KEEP (*(SORT(.init_array.*)))
> + KEEP (*(.init_array ))
> PROVIDE_HIDDEN (__init_array_end = .);
> }
> .fini_array :
> {
> PROVIDE_HIDDEN (__fini_array_start = .);
> - KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
> - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o
> *crtend?.o ) .dtors))
> + KEEP (*(SORT(.fini_array.*)))
> + KEEP (*(.fini_array ))
> PROVIDE_HIDDEN (__fini_array_end = .);
> }
> .ctors :
Try adding --enable-initfini-array to the cross configuration. The
autoconf test for this option uses AC_RUN_IFELSE so only works on
native builds.
--
Alan Modra
Australia Development Lab, IBM