svn commit: trunk/uClibc/ldso: include ldso
vapier at uclibc.org
vapier at uclibc.org
Wed Jul 5 07:04:21 UTC 2006
Author: vapier
Date: 2006-07-05 00:04:18 -0700 (Wed, 05 Jul 2006)
New Revision: 15616
Log:
patch from Bernd Schmidt to abstract away load addresses
Modified:
trunk/uClibc/ldso/include/dl-defs.h
trunk/uClibc/ldso/ldso/dl-startup.c
Changeset:
Modified: trunk/uClibc/ldso/include/dl-defs.h
===================================================================
--- trunk/uClibc/ldso/include/dl-defs.h 2006-07-05 06:41:54 UTC (rev 15615)
+++ trunk/uClibc/ldso/include/dl-defs.h 2006-07-05 07:04:18 UTC (rev 15616)
@@ -1,6 +1,6 @@
/* vi: set sw=4 ts=4: */
/*
- * Copyright (C) 2000-2005 by Erik Andersen <andersen at codepoet.org>
+ * Copyright (C) 2000-2006 by Erik Andersen <andersen at codepoet.org>
*
* GNU Lesser General Public License version 2.1 or later.
*/
@@ -66,4 +66,13 @@
#endif
+/* Initialize a LOADADDR representing the loader itself. It's only
+ * called from DL_BOOT, so additional arguments passed to it may be
+ * referenced.
+ */
+#ifndef DL_INIT_LOADADDR_BOOT
+# define DL_INIT_LOADADDR_BOOT(LOADADDR, BASEADDR) \
+ ((LOADADDR) = (BASEADDR))
+#endif
+
#endif /* _LD_DEFS_H */
Modified: trunk/uClibc/ldso/ldso/dl-startup.c
===================================================================
--- trunk/uClibc/ldso/ldso/dl-startup.c 2006-07-05 06:41:54 UTC (rev 15615)
+++ trunk/uClibc/ldso/ldso/dl-startup.c 2006-07-05 07:04:18 UTC (rev 15616)
@@ -4,7 +4,7 @@
* after resolving ELF shared library symbols
*
* Copyright (C) 2005 by Joakim Tjernlund
- * Copyright (C) 2000-2004 by Erik Andersen <andersen at codepoet.org>
+ * Copyright (C) 2000-2006 by Erik Andersen <andersen at codepoet.org>
* Copyright (c) 1994-2000 Eric Youngdale, Peter MacDonald,
* David Engel, Hongjiu Lu and Mitch D'Souza
*
@@ -168,7 +168,7 @@
* (esp since SEND_STDERR() needs this on some platforms... */
if (!auxvt[AT_BASE].a_un.a_val)
auxvt[AT_BASE].a_un.a_val = elf_machine_load_address();
- load_addr = auxvt[AT_BASE].a_un.a_val;
+ DL_INIT_LOADADDR_BOOT(load_addr, auxvt[AT_BASE].a_un.a_val);
header = (ElfW(Ehdr) *) auxvt[AT_BASE].a_un.a_val;
/* Check the ELF header to make sure everything looks ok. */
More information about the uClibc-cvs
mailing list