summaryrefslogtreecommitdiff
path: root/ldso/ldso/avr32/resolve.S
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2007-11-16 14:26:46 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2007-11-16 14:26:46 +0000
commite130b681c43ee2215512ffcf6cadcbc4487e96e6 (patch)
tree107831cfb61595a907dff264d1bdbf02e18c53f5 /ldso/ldso/avr32/resolve.S
parentc08b07bc9bff10988100653d280e8afe428249f7 (diff)
Added AVR32 support to uClibc. Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Diffstat (limited to 'ldso/ldso/avr32/resolve.S')
-rw-r--r--ldso/ldso/avr32/resolve.S28
1 files changed, 28 insertions, 0 deletions
diff --git a/ldso/ldso/avr32/resolve.S b/ldso/ldso/avr32/resolve.S
new file mode 100644
index 000000000..ad90c2548
--- /dev/null
+++ b/ldso/ldso/avr32/resolve.S
@@ -0,0 +1,28 @@
+/*
+ * Linux dynamic resolving code for AVR32. Fixes up the GOT entry as
+ * indicated in register r12 and jumps to the resolved address.
+ *
+ * This file is subject to the terms and conditions of the GNU Lesser General
+ * Public License. See the file "COPYING.LIB" in the main directory of this
+ * archive for more details.
+ *
+ * Copyright (C) 2004-2007 Atmel Corporation
+ */
+
+#define ip r5
+
+ .text
+ .global _dl_linux_resolve
+ .type _dl_linux_resolve,@function
+_dl_linux_resolve:
+ /* The PLT code pushed r8 for us. It contains the address of this
+ function's GOT entry, that is entry 0. ip contains the address
+ of the GOT entry of the function we wanted to call. */
+ stm --sp, r9-r12, lr
+ mov r11, r8
+ sub r12, ip, r8
+ rcall _dl_linux_resolver
+ mov ip, r12
+ popm r8-r12,lr
+ mov pc, ip
+ .size _dl_linux_resolve, . - _dl_linux_resolve