summaryrefslogtreecommitdiff
path: root/ldso/include
diff options
context:
space:
mode:
authorFilippo Arcidiacono <filippo.arcidiacono@st.com>2012-04-06 11:18:35 +0200
committerMike Frysinger <vapier@gentoo.org>2012-04-08 00:49:16 -0400
commit2e9c1dc78eedd055b5db779aadf0d09cf70c6710 (patch)
tree00e4c18b83175da48847eb47820ac20b202ab3c5 /ldso/include
parentdd109669be4b2f5ac69cf38ee1b67d6be74b620d (diff)
ldso: fix fdpic support broken from prelink patch
The fdpic support has been broken since the prelink support was added, because it didn't take into account DL_LOADADDR_TYPE could be a different type of ElfW(Addr). Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'ldso/include')
-rw-r--r--ldso/include/dl-defs.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/ldso/include/dl-defs.h b/ldso/include/dl-defs.h
index 11edc4dfc..f71ba9b48 100644
--- a/ldso/include/dl-defs.h
+++ b/ldso/include/dl-defs.h
@@ -259,4 +259,26 @@ typedef struct {
# define DL_MAP_SEGMENT(EPNT, PPNT, INFILE, FLAGS) 0
#endif
+/* Define this to declare the library offset. */
+#ifndef DL_DEF_LIB_OFFSET
+# define DL_DEF_LIB_OFFSET static unsigned long _dl_library_offset
+#endif
+
+/* Define this to get the library offset. */
+#ifndef DL_GET_LIB_OFFSET
+# define DL_GET_LIB_OFFSET() _dl_library_offset
+#endif
+
+/* Define this to set the library offset as difference beetwen the mapped
+ library address and the smallest virtual address of the first PT_LOAD
+ segment. */
+#ifndef DL_SET_LIB_OFFSET
+# define DL_SET_LIB_OFFSET(offset) (_dl_library_offset = (offset))
+#endif
+
+/* Define this to get the real object's runtime address. */
+#ifndef DL_GET_RUN_ADDR
+# define DL_GET_RUN_ADDR(loadaddr, mapaddr) (mapaddr)
+#endif
+
#endif /* _LD_DEFS_H */