Problem of execution order of entries in .fini_array

Hans-Peter Nilsson
Thu Apr 16 16:21:00 GMT 2009

> Received-SPF: none (bart: domain of does not designate permitted sender hosts) client ip=;;;
> X-SWARE-Spam-Status: No, hits=-0.4 required=5.0 	tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
> X-Spam-Check-By:
> MIME-Version: 1.0
> Date: Wed, 15 Apr 2009 16:08:17 -0700
> From: Jing Yu <>

(Long analysis cut short)
> Should we change the access order or fini_array?

I'd suggest correcting the access order, as opposed to hacking
the linker.  See for example glibc.

(Note that there are *three* files in newlib doing the access in
the wrong order.  And I'm not counting the misguided
newlib/libc/sys/arm/crt0.S in which fini_array is treated like a
synonym for _fini!)

brgds, H-P

More information about the Newlib mailing list