From 2e9c1dc78eedd055b5db779aadf0d09cf70c6710 Mon Sep 17 00:00:00 2001 From: Filippo Arcidiacono Date: Fri, 6 Apr 2012 11:18:35 +0200 Subject: 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 Signed-off-by: Mike Frysinger --- ldso/include/dl-defs.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'ldso/include') 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 */ -- cgit v1.2.3