summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
Diffstat (limited to 'ldso')
-rw-r--r--ldso/include/dl-defs.h6
-rw-r--r--ldso/ldso/dl-startup.c3
2 files changed, 7 insertions, 2 deletions
diff --git a/ldso/include/dl-defs.h b/ldso/include/dl-defs.h
index 18eff43c1..a8f6d6aae 100644
--- a/ldso/include/dl-defs.h
+++ b/ldso/include/dl-defs.h
@@ -66,6 +66,12 @@ typedef struct {
#endif
+/* Provide a means for a port to pass additional arguments to the _dl_start
+ function. */
+#ifndef DL_START
+# define DL_START(X) static void * __attribute_used__ _dl_start(X)
+#endif
+
/* Machines in which different sections may be relocated by different
* amounts should define this and LD_RELOC_ADDR. If you change this,
* make sure you change struct link_map in include/link.h accordingly
diff --git a/ldso/ldso/dl-startup.c b/ldso/ldso/dl-startup.c
index 69398268b..5cf1d049e 100644
--- a/ldso/ldso/dl-startup.c
+++ b/ldso/ldso/dl-startup.c
@@ -110,7 +110,7 @@ strong_alias(__rtld_stack_end, __libc_stack_end) /* Exported version of __rtld_s
NULL
auxvt[0...N] Auxiliary Vector Table elements (mixed types)
*/
-static void * __attribute_used__ _dl_start(unsigned long args)
+DL_START(unsigned long args)
{
unsigned int argc;
char **argv, **envp;
@@ -313,7 +313,6 @@ static void * __attribute_used__ _dl_start(unsigned long args)
#ifndef START
return _dl_elf_main;
#else
-#warning You need to update your arch ldso code
START();
#endif
}