differences in generated ldscripts for native and cross builds
Mike Frysinger
vapier@gentoo.org
Sun Oct 11 18:56:00 GMT 2015
On 09 Oct 2015 22:45, Alan Modra wrote:
> 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.
can't we make this smarter ? this feature has been around for quite
a long time now. seems crazy that the default is to disable these
when cross-compiling.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://sourceware.org/pipermail/binutils/attachments/20151011/10b8c668/attachment.sig>
More information about the Binutils
mailing list