http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49680
--- Comment #15 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2011-07-09
00:32:08 UTC ---
(In reply to comment #11)
> Basically, nonsense like
>
> static void __attribute__((__used__)) call___do_global_dtors_aux (void) { asm
> ("\t.section\t.fini"); __do_global_dtors_aux (); asm ("\t.text"); }
>
> only accidentally worked before. I guess it continues to work
> so long as debug info is not enabled.
So, the documentation for CRT_CALL_STATIC_FUNCTION should be amended something
like this?
Index: tm.texi.in
===================================================================
--- tm.texi.in (revision 175272)
+++ tm.texi.in (working copy)
@@ -6878,6 +6880,8 @@ sections. By default, this macro uses a
ports need hand-crafted assembly code to avoid dependencies on
registers initialized in the function prologue or to ensure that
constant pools don't end up too far way in the text section.
+Also, the default value will not work for targets using DWARF 2
+debugging information.
@end defmac
@defmac TARGET_LIBGCC_SDATA_SECTION
I'll take further discussion to gcc-patches@.