summaryrefslogtreecommitdiff
path: root/ldso/ldso/mips/dl-startup.h
diff options
context:
space:
mode:
authorlinted <linted@users.noreply.github.com>2022-08-20 16:41:38 -0400
committerWaldemar Brodkorb <wbx@openadk.org>2022-09-07 08:32:47 +0200
commit365da5ab379a3e38e196cad370695c4b300cfe51 (patch)
treeaa4eeb3a03c03dcd11570247b328086f2c9208ac /ldso/ldso/mips/dl-startup.h
parentd46709504efa46e5b9b52739a48ab61b39fd4971 (diff)
Added support for creation of Static Position-Independent Executables (PIE) on mips
Updated config to allow compilation of rcrt1.o for mips and modified it's crt1.S to perform relocates in __start. The mips architecture performs relocations differently then most other architectures. reloc_static_pie was rewritten, taking code from dl-startup.c, in order to perfrom the additional relocations. Modifications were made to mips' dl-startup.h to allow for the use of contained macros without including _start definition. Signed-off-by: linted <linted@users.noreply.github.com>
Diffstat (limited to 'ldso/ldso/mips/dl-startup.h')
-rw-r--r--ldso/ldso/mips/dl-startup.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/ldso/ldso/mips/dl-startup.h b/ldso/ldso/mips/dl-startup.h
index 8026f1702..c2168d774 100644
--- a/ldso/ldso/mips/dl-startup.h
+++ b/ldso/ldso/mips/dl-startup.h
@@ -7,6 +7,7 @@
#include <sgidefs.h>
+#ifndef L_rcrt1
__asm__(""
" .text\n"
" .globl _start\n"
@@ -114,6 +115,7 @@ __asm__(""
"\n\n"
".previous\n"
);
+#endif
/*
* Get a pointer to the argv array. On many platforms this can be just
@@ -191,6 +193,5 @@ do { \
case R_MIPS_NONE: \
break; \
default: \
- SEND_STDERR("Aiieeee!"); \
_dl_exit(1); \
}