[Bug target/101115] ld.bfd: warning: .init_array section has zero size
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101115 --- Comment #3 from Chris Packham --- An update[1]. It seems that --disable-tm-clone-registry is the option that results in crtbegin.o having a zero sized .init_array. I can't really follow crcstuff.c but I see USE_TM_CLONE_REGISTRY in the context of .init_array so something is happening when tm-clone-registry is disabled. [1] - https://sourceware.org/pipermail/binutils/2021-June/117066.html
[Bug target/101115] ld.bfd: warning: .init_array section has zero size
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101115 --- Comment #2 from Chris Packham --- (In reply to Andrew Pinski from comment #1) > Try adding --enable-initfini-array to gcc config > > Most likely GCC config is not detecting .init_array/.fini_array support > which is now always turned on the trunk for *linux-* targets. Yes that does the trick. I'll work on plumbing that into ct-ng when building GCC 10 or GCC 11. Any idea how that will interact with the non-GNU libcs (specifically musl and uClibc)?
[Bug target/101115] ld.bfd: warning: .init_array section has zero size
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101115 --- Comment #1 from Andrew Pinski --- Try adding --enable-initfini-array to gcc config Most likely GCC config is not detecting .init_array/.fini_array support which is now always turned on the trunk for *linux-* targets.