GCC 11.1.10 ld: warning: .init_array section has zero size
Chris Packham
Chris.Packham@alliedtelesis.co.nz
Tue Jun 15 08:04:22 GMT 2021
Hi,
I'm trying to migrate our builds to GCC 11.1.0 + binutils 2.36.1 and I'm
getting a weird linker warning for ARM (I'm also building for MIPS64
where I don't see the warning).
$ rm -f test; make CC=arm-unknown-linux-gnueabi-gcc test
arm-unknown-linux-gnueabi-gcc test.c -o test
/usr/bin/../lib/gcc/arm-unknown-linux-gnueabi/11.1.0/../../../../arm-unknown-linux-gnueabi/bin/ld:
warning: .init_array section has zero size
/usr/bin/../lib/gcc/arm-unknown-linux-gnueabi/11.1.0/../../../../arm-unknown-linux-gnueabi/bin/ld:
warning: .fini_array section has zero size
I'm not sure if this is a GCC or a binutils problem so I figured I'd
start with binutils since the warning is coming from ld. I'm not sure
it's causing any specific problem but it might be upsetting some
autoconf checks (one package I'm having problems with is failing to
detect some functions with AC_CHECK_FUNCS).
Is there any flag that I can pass to get rid of this warning?
Thanks,
Chris
$ arm-unknown-linux-gnueabi-gcc --version
arm-unknown-linux-gnueabi-gcc (crosstool-NG 1.24.0.373_5ab29fb) 11.1.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ arm-unknown-linux-gnueabi-ld --version
GNU ld (crosstool-NG 1.24.0.373_5ab29fb) 2.36.1
Copyright (C) 2021 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later
version.
This program has absolutely no warranty.
More information about the Binutils
mailing list