aboutsummaryrefslogtreecommitdiff
path: root/ports/sysdeps/tile/start.S
diff options
context:
space:
mode:
Diffstat (limited to 'ports/sysdeps/tile/start.S')
-rw-r--r--ports/sysdeps/tile/start.S13
1 files changed, 12 insertions, 1 deletions
diff --git a/ports/sysdeps/tile/start.S b/ports/sysdeps/tile/start.S
index 99415647c2..3e7ec5cccf 100644
--- a/ports/sysdeps/tile/start.S
+++ b/ports/sysdeps/tile/start.S
@@ -62,6 +62,13 @@
#include <sysdep.h>
#include <arch/abi.h>
+/* Just create no-ops if we don't support PC-relative PLT relocations. */
+#ifdef NO_PLT_PCREL
+# define hw2_last_plt(x) 0
+# define hw1_plt(x) 0
+# define hw0_plt(x) 0
+#endif
+
.text
.global _start
.type _start,@function
@@ -155,7 +162,11 @@ _start:
}
{
ADD_PTR r4, r4, r13
- jalr r12
+# ifdef NO_PLT_PCREL
+ j plt(__libc_start_main)
+# else
+ jr r12
+# endif
}
#else
addli r0, r13, lo16(main - .Lmy_pc)