Hi, I have submitted a patch to force .init_array suppor for GLIBC
Index: gcc/ChangeLog =================================================================== --- gcc/ChangeLog (revision 266812) +++ gcc/ChangeLog (working copy) @@ -1,3 +1,7 @@ +2018-12-05 Xianmiao Qu <xianmiao...@c-sky.com> + + * config.gcc (csky-*-linux-gnu*): Force .init_array support. + 2018-12-05 Segher Boessenkool <seg...@kernel.crashing.org> * config/rs6000/rs6000.c (rs6000_function_arg): Only do the special Index: gcc/config.gcc =================================================================== --- gcc/config.gcc (revision 266812) +++ gcc/config.gcc (working copy) @@ -1356,6 +1356,9 @@ csky-*-*) case ${target} in csky-*-linux-gnu*) tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" + # Force .init_array support. The configure script cannot always + # automatically detect that GAS supports it, yet we require it. + gcc_cv_initfini_array=yes ;; csky-*-linux-uclibc*) tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"