summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@st.com>2018-07-04 15:55:18 (GMT)
committerWaldemar Brodkorb <wbrodkorb@conet.de>2018-08-10 14:01:58 (GMT)
commit4f0132e337b27f6f5d165a9dfb2bfa04cff7be1b (patch)
treecc3f7cf6b3e51c79ab8bbe47e9b0dbc77cda8a9b
parent5ec586eb37f61e57f19ac60b58af61f167ca054a (diff)
rtld: Avoid FUNCDESC relocation on _start
* 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>
-rw-r--r--ldso/ldso/ldso.c6
1 files changed, 6 insertions, 0 deletions
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;
+#else
extern void _start(void);
+#endif
#ifdef __UCLIBC_HAS_SSP__
# include <dl-osinfo.h>