summaryrefslogtreecommitdiff
path: root/ldso/ldso/cris/dl-startup.h
diff options
context:
space:
mode:
authorTobias Anderberg <tobias.anderberg@axis.com>2002-09-16 08:11:43 +0000
committerTobias Anderberg <tobias.anderberg@axis.com>2002-09-16 08:11:43 +0000
commit27ef34961183c110abc8c5fee05f1c5016c8042a (patch)
treedf720d9ff9ffd882ec21b96e71543692895cfa68 /ldso/ldso/cris/dl-startup.h
parent66812a6f8c6cdc5fd2495ebf45ebaf606eb80198 (diff)
Initial version of the dynamic linker code for the CRIS port.
Diffstat (limited to 'ldso/ldso/cris/dl-startup.h')
-rw-r--r--ldso/ldso/cris/dl-startup.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/ldso/ldso/cris/dl-startup.h b/ldso/ldso/cris/dl-startup.h
new file mode 100644
index 000000000..5fe5cae43
--- /dev/null
+++ b/ldso/ldso/cris/dl-startup.h
@@ -0,0 +1,17 @@
+/*
+ * This code fix the stack pointer so that the dunamic linker
+ * can find argc, argv and auxvt (Auxillary Vector Table).
+ */
+asm("\
+ .text
+ .globl _dl_boot
+ .type _dl_boot,@function
+_dl_boot:
+ move.d $sp,$r10
+ move.d $pc,$r9
+ add.d _dl_boot2 - ., $r9
+ jsr $r9
+");
+
+#define _dl_boot _dl_boot2
+#define LD_BOOT(X) static void __attribute__ ((unused)) _dl_boot(X)