This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
HAVE_HIDDEN doesnt always mean DONT_USE_BOOTSTRAP_MAP
- From: Steve Munroe <sjmunroe at vnet dot ibm dot com>
- To: libc-alpha at sources dot redhat dot com
- Cc: geoffk at geoffk dot org, roland at frob dot com
- Date: Mon, 26 Aug 2002 12:03:35 -0500
- Subject: HAVE_HIDDEN doesnt always mean DONT_USE_BOOTSTRAP_MAP
HAVE_HIDDEN does not necessarily mean that it is safe to access static
storage during the bootstrap relocation of the loader (rtld.c in _dl-start).
2002-08-26 Steven Munroe <sjmunroe@us.ibm.com>
* elf/rtld.c [!__powerpc64__] (DONT_USE_BOOTSTRAP_MAP): Macro defined.
TOC based ABIs like powerpc64 always use the TOC to access static storage.
So Accessing static before the TOC is relocated tends to cause segfaults.
On powerpc64 the the loader must use the bootstrap_map (on the stack)
and DONT_USE_BOOTSTRAP_MAP must not be defined.
diff -rc2P -xCVS libc23-cvstip-20020823/elf/rtld.c libc23/elf/rtld.c
*** libc23-cvstip-20020823/elf/rtld.c Wed Aug 21 19:09:26 2002
--- libc23/elf/rtld.c Fri Aug 23 18:37:36 2002
***************
*** 131,135 ****
hidden. */
#ifdef HAVE_HIDDEN
! # define DONT_USE_BOOTSTRAP_MAP 1
#endif
--- 131,137 ----
hidden. */
#ifdef HAVE_HIDDEN
! # ifndef __powerpc64__
! # define DONT_USE_BOOTSTRAP_MAP 1
! # endif
#endif