This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [arm] Use .init_array for static constructors.
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Paul Brook <paul at codesourcery dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Mark Mitchell <mark at codesourcery dot com>
- Date: Tue, 12 Oct 2004 11:05:09 +0100
- Subject: Re: [arm] Use .init_array for static constructors.
- References: <200409240047.20463.paul@codesourcery.com>
On Fri, 2004-09-24 at 00:47, Paul Brook wrote:
> The eabi doesn't mention how static destructor lists should be handled, though
> it's implied that the atexit functionality makes these unnecessary.
> I've left the handling of .dtors unchanged.
The next draft does:
R_ARM_TARGET1 is processed in a platform-specific manner. It may
only be used in sections with the types SHT_INIT_ARRAY,
SHT_PREINIT_ARRAY, and SHT_FINI_ARRAY. The relocation must be
processed either in the same way as R_ARM_REL32 or as
R_ARM_ABS32: a virtual platform must specify which method is
used. If the relocation is processed as R_ARM_REL32 then the
section may be marked read-only and coalesced with other
read-only data, otherwise it may only be marked read-only if it
does not require dynamic linking.
However, you are right that this won't normally affect C++.
R.