summaryrefslogtreecommitdiff
path: root/libc/ports/sysdeps/tile/start.S
diff options
context:
space:
mode:
Diffstat (limited to 'libc/ports/sysdeps/tile/start.S')
-rw-r--r--libc/ports/sysdeps/tile/start.S13
1 files changed, 12 insertions, 1 deletions
diff --git a/libc/ports/sysdeps/tile/start.S b/libc/ports/sysdeps/tile/start.S
index 54f015f4d..47a7b4088 100644
--- a/libc/ports/sysdeps/tile/start.S
+++ b/libc/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)