r4175 - in glibc-package/branches/eglibc-2.11/debian: . patches patches/hppa
Author: schizo
Date: 2010-02-09 20:52:36 +0000 (Tue, 09 Feb 2010)
New Revision: 4175
Added:
glibc-package/branches/eglibc-2.11/debian/patches/hppa/_dl_fptr_init.diff
Modified:
glibc-package/branches/eglibc-2.11/debian/changelog
glibc-package/branches/eglibc-2.11/debian/patches/series
Log:
Add debian/patches/hppa/_dl_fptr_init.diff from patofiero
Modified: glibc-package/branches/eglibc-2.11/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.11/debian/changelog 2010-02-09 20:49:59 UTC (rev 4174)
+++ glibc-package/branches/eglibc-2.11/debian/changelog 2010-02-09 20:52:36 UTC (rev 4175)
@@ -46,6 +46,7 @@
* Add debian/patches/alpha/local-fcntl_h.diff.
* Add debian/patches/hppa/ELF_MACHINE_BEFORE_RTLD_RELOC.diff from
Carlos O'Donell.
+ * Add debian/patches/hppa/_dl_fptr_init.diff from Carlos O'Donnell.
[ Aurelien Jarno ]
* Enable multi-arch.
Added: glibc-package/branches/eglibc-2.11/debian/patches/hppa/_dl_fptr_init.diff
===================================================================
--- glibc-package/branches/eglibc-2.11/debian/patches/hppa/_dl_fptr_init.diff (rev 0)
+++ glibc-package/branches/eglibc-2.11/debian/patches/hppa/_dl_fptr_init.diff 2010-02-09 20:52:36 UTC (rev 4175)
@@ -0,0 +1,53 @@
+diff --git a/elf/dl-fptr.c b/elf/dl-fptr.c
+index e068124..036e9d6 100644
+--- a/elf/dl-fptr.c
++++ b/elf/dl-fptr.c
+@@ -1,5 +1,5 @@
+ /* Manage function descriptors. Generic version.
+- Copyright (C) 1999-2004, 2006 Free Software Foundation, Inc.
++ Copyright (C) 1999-2004, 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
+@@ -56,7 +56,8 @@ static struct local
+ }
+ local =
+ {
+- .root = &local.boot_table,
++ /* Address of .boot_table is not known until runtime. */
++ .root = 0,
+ .npages = 2,
+ .boot_table =
+ {
+@@ -93,6 +94,17 @@ new_fdesc_table (struct local *l, size_t *size)
+ return new_table;
+ }
+
++/* Must call _dl_fptr_init before using any other function. */
++void
++_dl_fptr_init (void)
++{
++ struct local *l;
++
++ ELF_MACHINE_LOAD_ADDRESS (l, local);
++ /* Initialize root once. */
++ if (__builtin_expect (l->root == 0, 0))
++ l->root = &l->boot_table;
++}
+
+ static ElfW(Addr)
+ make_fdesc (ElfW(Addr) ip, ElfW(Addr) gp)
+diff --git a/sysdeps/generic/dl-fptr.h b/sysdeps/generic/dl-fptr.h
+index d47fb7b..b957fbb 100644
+--- a/sysdeps/generic/dl-fptr.h
++++ b/sysdeps/generic/dl-fptr.h
+@@ -40,6 +40,9 @@ struct link_map;
+
+ extern ElfW(Addr) _dl_boot_fptr_table [];
+
++/* Must be called before any other function. */
++extern void _dl_fptr_init (void);
++
+ extern ElfW(Addr) _dl_make_fptr (struct link_map *, const ElfW(Sym) *,
+ ElfW(Addr));
+
Modified: glibc-package/branches/eglibc-2.11/debian/patches/series
===================================================================
--- glibc-package/branches/eglibc-2.11/debian/patches/series 2010-02-09 20:49:59 UTC (rev 4174)
+++ glibc-package/branches/eglibc-2.11/debian/patches/series 2010-02-09 20:52:36 UTC (rev 4175)
@@ -75,6 +75,7 @@
hppa/submitted-nptl-carlos.diff
hppa/cvs-nptl-compat.diff
hppa/local-stack-grows-up.diff
+hppa/_dl_fptr_init.diff
hppa/ELF_MACHINE_BEFORE_RTLD_RELOC.diff
hurd-i386/local-dl-dynamic-weak.diff
Reply to: