From 95adc01517efce365da4e40e0d2a081ec4497928 Mon Sep 17 00:00:00 2001 From: Mark Salter Date: Wed, 23 Feb 2011 12:56:43 +0100 Subject: Add support for DSBT ELF to ld.so This adds support for DSBT ELF to ld.so. This uses loadmaps like FD-PIC. Some code is added in ld.so to initialize the DSBT tables, and there's also a new target macro FINISH_BOOTSTRAP_RELOC. Signed-off-by: Mark Salter Signed-off-by: Aurelien Jacquiot Signed-off-by: Bernd Schmidt --- include/link.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/link.h b/include/link.h index cbef6165a..185ee701e 100644 --- a/include/link.h +++ b/include/link.h @@ -1,6 +1,6 @@ /* Data structure for communication from the run-time dynamic linker for loaded ELF shared objects. - Copyright (C) 1995-2001, 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1995-2001, 2004, 2005, 2006, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -83,6 +83,9 @@ extern ElfW(Dyn) _DYNAMIC[]; #ifdef __FDPIC__ # include #endif +#ifdef __DSBT__ +# include +#endif /* Structure describing a loaded shared object. The `l_next' and `l_prev' members form a chain of all the shared objects loaded at startup. @@ -97,8 +100,12 @@ struct link_map #ifdef __FDPIC__ struct elf32_fdpic_loadaddr l_addr; +#else +#ifdef __DSBT__ + struct elf32_dsbt_loadaddr l_addr; #else ElfW(Addr) l_addr; /* Base address shared object is loaded at. */ +#endif #endif char *l_name; /* Absolute file name object was found in. */ ElfW(Dyn) *l_ld; /* Dynamic section of the shared object. */ @@ -177,8 +184,12 @@ struct dl_phdr_info { #ifdef __FDPIC__ struct elf32_fdpic_loadaddr dlpi_addr; +#else +#ifdef __DSBT__ + struct elf32_dsbt_loadaddr dlpi_addr; #else ElfW(Addr) dlpi_addr; +#endif #endif const char *dlpi_name; const ElfW(Phdr) *dlpi_phdr; -- cgit v1.2.3