aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Hainque <hainque@act-europe.fr>2004-10-04 17:01:21 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2004-10-04 17:01:21 +0200
commit9a03df55561781c0170eb5dde09c0b062fd76ebe (patch)
treee2f1eecb090bb4ba07e213b8ec9ece3c21166b9c
parent28d6470f55e9975b037aa698407939635e28e4c6 (diff)
downloadgcc-9a03df55561781c0170eb5dde09c0b062fd76ebe.zip
gcc-9a03df55561781c0170eb5dde09c0b062fd76ebe.tar.gz
gcc-9a03df55561781c0170eb5dde09c0b062fd76ebe.tar.bz2
init.c (__gnat_initialize): Call an Ada subprogram to perform the table registration calls when need be.
2004-10-04 Olivier Hainque <hainque@act-europe.fr> * init.c (__gnat_initialize): Call an Ada subprogram to perform the table registration calls when need be. Ensures no reference to the crt ctors symbol are issued in the SJLJ case, which avoids possible undefined symbol errors in the case of modules to be statically linked with the kernel. From-SVN: r88507
-rw-r--r--gcc/ada/ChangeLog8
-rw-r--r--gcc/ada/init.c18
2 files changed, 21 insertions, 5 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 85551cb..2caf8dd 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,11 @@
+2004-10-04 Olivier Hainque <hainque@act-europe.fr>
+
+ * init.c (__gnat_initialize): Call an Ada subprogram to perform the
+ table registration calls when need be. Ensures no reference to the crt
+ ctors symbol are issued in the SJLJ case, which avoids possible
+ undefined symbol errors in the case of modules to be statically linked
+ with the kernel.
+
2004-10-04 Javier Miranda <miranda@gnat.com>
* sem_ch4.adb (Try_Object_Operation): Reformat the code to expand
diff --git a/gcc/ada/init.c b/gcc/ada/init.c
index 4a54aff..e79ce9f 100644
--- a/gcc/ada/init.c
+++ b/gcc/ada/init.c
@@ -1850,11 +1850,19 @@ __gnat_initialize (void)
#if DWARF2_UNWIND_INFO && defined (_ARCH_PPC)
{
- extern const int __module_has_ctors;
- extern void __do_global_ctors ();
-
- if (! __module_has_ctors)
- __do_global_ctors ();
+ /* The scheme described above is only useful for the actual ZCX case, and
+ we don't want any reference to the crt provided symbols otherwise. We
+ may not link with any of the crt objects in the non-ZCX case, e.g. from
+ documented procedures instructing the use of -nostdlib, and references
+ to the ctors symbols here would just remain unsatisfied.
+
+ We have no way to avoid those references in the right conditions in this
+ C module, because we have nothing like a IN_ZCX_RTS macro. This aspect
+ is then deferred to an Ada routine, which can do that based on a test
+ against a constant System flag value. */
+
+ extern void __gnat_vxw_setup_for_eh (void);
+ __gnat_vxw_setup_for_eh ();
}
#endif
}