summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-10-29 05:28:15 +0000
committerEric Andersen <andersen@codepoet.org>2002-10-29 05:28:15 +0000
commit5fedc35ef2c219d4ada5a52993c20c8ea4a60c06 (patch)
tree353303d8bd6688982618288caa02eab941adfb4c /libc/sysdeps/linux/common
parent6a3510f62cbcf0db3f4ab99f2ed9c433d52d7149 (diff)
Add in a horrible hack that seems necessary for the Hitachi
SH processors to work properly. -Erik
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r--libc/sysdeps/linux/common/initfini.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/initfini.c b/libc/sysdeps/linux/common/initfini.c
index 4a6ebee75..927ed1db3 100644
--- a/libc/sysdeps/linux/common/initfini.c
+++ b/libc/sysdeps/linux/common/initfini.c
@@ -109,6 +109,11 @@ void _init (void)
asm ("ALIGN");
asm("END_INIT");
+#if defined(__sh__)
+ /* This is a horrible hack, but seems to be necessary to
+ * make this work for the Hitachi SH processors */
+ asm ("\n.L5:\n\t.long _GLOBAL_OFFSET_TABLE_\n");
+#endif
/* Now the epilog. */
asm ("\n/*@_init_PROLOG_ENDS*/");
asm ("\n/*@_init_EPILOG_BEGINS*/");
@@ -129,6 +134,11 @@ void _fini (void)
/* End of the _fini prolog. */
asm ("ALIGN");
asm ("END_FINI");
+#if defined(__sh__)
+ /* This is a horrible hack, but seems to be necessary to
+ * make this work for the Hitachi SH processors */
+ asm ("\n.L10:\n\t.long _GLOBAL_OFFSET_TABLE_\n");
+#endif
asm ("\n/*@_fini_PROLOG_ENDS*/");
{