diff mbox series

[uclibc-ng-devel,05/32,ARM,FDPIC] rtld: Avoid FUNCDESC relocation on _start

Message ID 20180704155605.1892-6-christophe.lyon@st.com
State Accepted
Headers show
Series FDPIC ABI for ARM | expand

Commit Message

Christophe Lyon July 4, 2018, 3:55 p.m. UTC
* ldso/ldso/ldso.c (_start): Fix definition for __FDPIC__.

Signed-off-by: Mickaël Guêné <mickael.guene@st.com>
Signed-off-by: Christophe Lyon <christophe.lyon@st.com>
diff mbox series


diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
index 17818b5..c625757 100644
--- a/ldso/ldso/ldso.c
+++ b/ldso/ldso/ldso.c
@@ -109,7 +109,13 @@  static unsigned char *_dl_mmap_zero   = NULL;	/* Also used by _dl_malloc */
 static struct elf_resolve **init_fini_list;
 static struct elf_resolve **scope_elem_list;
 static unsigned int nlist; /* # items in init_fini_list */
+#ifdef __FDPIC__
+/* We need to take the address of _start instead of its FUNCDESC:
+   declare it as void* to control the relocation emitted.  */
+extern void *_start;
 extern void _start(void);
 #ifdef __UCLIBC_HAS_SSP__
 # include <dl-osinfo.h>