This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.15-957-g37fb1dc
- From: schwab at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 18 May 2012 10:04:30 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.15-957-g37fb1dc
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 37fb1dc05733e0f3d7eca64820dc5c2c25f2a6d9 (commit)
via b53ef01aa25acc4c4f0b41dd120e90d6eb69e370 (commit)
from 7a185db2b7f9853d35fbd1396a56d0c7a64b4bd9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=37fb1dc05733e0f3d7eca64820dc5c2c25f2a6d9
commit 37fb1dc05733e0f3d7eca64820dc5c2c25f2a6d9
Author: Andreas Schwab <schwab@linux-m68k.org>
Date: Wed May 16 22:40:23 2012 +0200
Avoid runtime GOT relocations in ld.so on powerpc
diff --git a/ChangeLog b/ChangeLog
index 6c9bc16..b0ffe61 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
2012-05-18 Andreas Schwab <schwab@linux-m68k.org>
+ * sysdeps/powerpc/powerpc32/dl-start.S (_dl_start_user): Use
+ INTUSE on _dl_argv, and _rtld_local instead of _rtld_global.
+ * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S [IS_IN_rtld]:
+ Refer to _rtld_local_ro instead of _rtld_global_ro.
+ * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S [IS_IN_rtld]:
+ Likewise.
+ * sysdeps/powerpc/powerpc64/__longjmp-common.S [IS_IN_rtld]:
+ Likewise.
+ * sysdeps/powerpc/powerpc64/setjmp-common.S [IS_IN_rtld]:
+ Likewise.
+ * sysdeps/powerpc/powerpc64/dl-trampoline.S [SHARED]: Likewise.
+ * sysdeps/powerpc/powerpc64/dl-machine.h: Use _rtld_local instead
+ of _rtld_global, and rtld_progname instead of _dl_argv[0].
+
* sysdeps/powerpc/powerpc32/dl-machine.c
(__elf_machine_runtime_setup) [PROF]: Don't reference
_dl_prof_resolve.
diff --git a/sysdeps/powerpc/powerpc32/dl-start.S b/sysdeps/powerpc/powerpc32/dl-start.S
index 2546fa5..b2d0194 100644
--- a/sysdeps/powerpc/powerpc32/dl-start.S
+++ b/sysdeps/powerpc/powerpc32/dl-start.S
@@ -1,6 +1,5 @@
/* Machine-dependent ELF startup code. PowerPC version.
- Copyright (C) 1995-2000, 2002, 2004, 2005, 2006, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 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
@@ -53,9 +52,9 @@ _dl_start_user:
/* the address of _start in r30, */
mr r30,r3
/* &_dl_argc in 29, &_dl_argv in 27, and _dl_loaded in 28. */
- lwz r28,_rtld_global@got(r31)
+ lwz r28,_rtld_local@got(r31)
lwz r29,_dl_argc@got(r31)
- lwz r27,_dl_argv@got(r31)
+ lwz r27,INTUSE(_dl_argv)@got(r31)
/* Call _dl_init (_dl_loaded, _dl_argc, _dl_argv, _dl_argv+_dl_argc+1). */
lwz r3,0(r28)
diff --git a/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S b/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S
index 4cfde6b..53af043 100644
--- a/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S
+++ b/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S
@@ -1,6 +1,5 @@
/* longjmp for PowerPC.
- Copyright (C) 1995-99, 2000, 2003-2006, 2009, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 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
@@ -38,7 +37,13 @@ ENTRY (BP_SYM (__longjmp))
addis r5,r5,_GLOBAL_OFFSET_TABLE_-got_label@ha
addi r5,r5,_GLOBAL_OFFSET_TABLE_-got_label@l
# ifdef SHARED
+# ifdef IS_IN_rtld
+ /* Inside ld.so we use the local alias to avoid runtime GOT
+ relocations. */
+ lwz r5,_rtld_local_ro@got(r5)
+# else
lwz r5,_rtld_global_ro@got(r5)
+# endif
mtlr r6
cfi_same_value (lr)
lwz r5,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET+4(r5)
diff --git a/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S b/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S
index b3c9f56..1f08b8b 100644
--- a/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S
+++ b/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S
@@ -1,5 +1,5 @@
/* setjmp for PowerPC.
- Copyright (C) 1995-2000, 2003-2005, 2006, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 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
@@ -90,7 +90,13 @@ ENTRY (BP_SYM (__sigsetjmp))
mtlr r6
cfi_same_value (lr)
# ifdef SHARED
+# ifdef IS_IN_rtld
+ /* Inside ld.so we use the local alias to avoid runtime GOT
+ relocations. */
+ lwz r5,_rtld_local_ro@got(r5)
+# else
lwz r5,_rtld_global_ro@got(r5)
+# endif
lwz r5,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET+4(r5)
# else
lwz r5,_dl_hwcap@got(r5)
diff --git a/sysdeps/powerpc/powerpc64/__longjmp-common.S b/sysdeps/powerpc/powerpc64/__longjmp-common.S
index 2ff9078..716b8ab 100644
--- a/sysdeps/powerpc/powerpc64/__longjmp-common.S
+++ b/sysdeps/powerpc/powerpc64/__longjmp-common.S
@@ -1,5 +1,5 @@
/* longjmp for PowerPC64.
- Copyright (C) 1995, 1996,1997,1999-2006,2009 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 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
@@ -31,7 +31,13 @@
.section ".toc","aw"
.LC__dl_hwcap:
# ifdef SHARED
+# ifdef IS_IN_rtld
+ /* Inside ld.so we use the local alias to avoid runtime GOT
+ relocations. */
+ .tc _rtld_local_ro[TC],_rtld_local_ro
+# else
.tc _rtld_global_ro[TC],_rtld_global_ro
+# endif
# else
.tc _dl_hwcap[TC],_dl_hwcap
# endif
diff --git a/sysdeps/powerpc/powerpc64/dl-machine.h b/sysdeps/powerpc/powerpc64/dl-machine.h
index 7c04757..a964a29 100644
--- a/sysdeps/powerpc/powerpc64/dl-machine.h
+++ b/sysdeps/powerpc/powerpc64/dl-machine.h
@@ -1,6 +1,6 @@
/* Machine-dependent ELF dynamic relocation inline functions.
PowerPC64 version.
- Copyright 1995-2005, 2006, 2008, 2010, 2011 Free Software Foundation, Inc.
+ Copyright 1995-2012 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
@@ -161,8 +161,8 @@ BODY_PREFIX "_start:\n" \
" .popsection\n" \
" .pushsection \".toc\",\"aw\"\n" \
DL_STARTING_UP_DEF \
-".LC__rtld_global:\n" \
-" .tc _rtld_global[TC],_rtld_global\n" \
+".LC__rtld_local:\n" \
+" .tc _rtld_local[TC],_rtld_local\n" \
".LC__dl_argc:\n" \
" .tc _dl_argc[TC],_dl_argc\n" \
".LC__dl_argv:\n" \
@@ -181,7 +181,7 @@ BODY_PREFIX "_dl_start_user:\n" \
/* the address of _start in r30. */ \
" mr 30,3\n" \
/* &_dl_argc in 29, &_dl_argv in 27, and _dl_loaded in 28. */ \
-" ld 28,.LC__rtld_global@toc(2)\n" \
+" ld 28,.LC__rtld_local@toc(2)\n" \
" ld 29,.LC__dl_argc@toc(2)\n" \
" ld 27,.LC__dl_argv@toc(2)\n" \
/* _dl_init (_dl_loaded, _dl_argc, _dl_argv, _dl_argv+_dl_argc+1). */ \
@@ -734,7 +734,7 @@ elf_machine_rela (struct link_map *map,
_dl_error_printf ("%s: Symbol `%s' has different size" \
" in shared object," \
" consider re-linking\n",
- _dl_argv[0] ?: "<program name unknown>",
+ rtld_progname ?: "<program name unknown>",
strtab + refsym->st_name);
}
memcpy (reloc_addr_arg, (char *) value,
diff --git a/sysdeps/powerpc/powerpc64/dl-trampoline.S b/sysdeps/powerpc/powerpc64/dl-trampoline.S
index 266efe3..7bdabe0 100644
--- a/sysdeps/powerpc/powerpc64/dl-trampoline.S
+++ b/sysdeps/powerpc/powerpc64/dl-trampoline.S
@@ -1,5 +1,5 @@
/* PLT trampolines. PPC64 version.
- Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2005-2012 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
@@ -169,7 +169,7 @@ END(_dl_runtime_resolve)
.section ".toc","aw"
.LC__dl_hwcap:
# ifdef SHARED
- .tc _rtld_global_ro[TC],_rtld_global_ro
+ .tc _rtld_local_ro[TC],_rtld_local_ro
# else
.tc _dl_hwcap[TC],_dl_hwcap
# endif
@@ -217,7 +217,7 @@ EALIGN(_dl_profile_resolve, 4, 0)
std r0,FRAME_SIZE+8(r1)
ld r12,.LC__dl_hwcap@toc(r2)
#ifdef SHARED
- /* Load _rtld-global._dl_hwcap. */
+ /* Load _rtld_local_ro._dl_hwcap. */
ld r12,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r12)
#else
ld r12,0(r12) /* Load extern _dl_hwcap. */
diff --git a/sysdeps/powerpc/powerpc64/setjmp-common.S b/sysdeps/powerpc/powerpc64/setjmp-common.S
index 1a1326e..bf8bb76 100644
--- a/sysdeps/powerpc/powerpc64/setjmp-common.S
+++ b/sysdeps/powerpc/powerpc64/setjmp-common.S
@@ -1,5 +1,5 @@
/* setjmp for PowerPC64.
- Copyright (C) 1995-2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 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
@@ -30,7 +30,13 @@
.section ".toc","aw"
.LC__dl_hwcap:
# ifdef SHARED
+# ifdef IS_IN_rtld
+ /* Inside ld.so we use the local alias to avoid runtime GOT
+ relocations. */
+ .tc _rtld_local_ro[TC],_rtld_local_ro
+# else
.tc _rtld_global_ro[TC],_rtld_global_ro
+# endif
# else
.tc _dl_hwcap[TC],_dl_hwcap
# endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b53ef01aa25acc4c4f0b41dd120e90d6eb69e370
commit b53ef01aa25acc4c4f0b41dd120e90d6eb69e370
Author: Andreas Schwab <schwab@linux-m68k.org>
Date: Wed May 16 22:05:58 2012 +0200
Fix undefined reference to _dl_prof_resolve in profiled libc
diff --git a/ChangeLog b/ChangeLog
index d364639..6c9bc16 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-18 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/powerpc/powerpc32/dl-machine.c
+ (__elf_machine_runtime_setup) [PROF]: Don't reference
+ _dl_prof_resolve.
+
2012-05-18 Andreas Jaeger <aj@suse.de>
* sysdeps/x86_64/fpu/bits/mathinline.h (lrintf): Make inline
diff --git a/sysdeps/powerpc/powerpc32/dl-machine.c b/sysdeps/powerpc/powerpc32/dl-machine.c
index e535480..26c38fd 100644
--- a/sysdeps/powerpc/powerpc32/dl-machine.c
+++ b/sysdeps/powerpc/powerpc32/dl-machine.c
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation functions. PowerPC version.
- Copyright (C) 1995-2006, 2008, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 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
@@ -235,16 +235,21 @@ __elf_machine_runtime_setup (struct link_map *map, int lazy, int profile)
if (lazy)
{
Elf32_Word *tramp = plt + PLT_TRAMPOLINE_ENTRY_WORDS;
- Elf32_Word dlrr = (Elf32_Word)(profile
- ? _dl_prof_resolve
- : _dl_runtime_resolve);
+ Elf32_Word dlrr;
Elf32_Word offset;
+#ifndef PROF
+ dlrr = (Elf32_Word) (profile
+ ? _dl_prof_resolve
+ : _dl_runtime_resolve);
if (profile && GLRO(dl_profile) != NULL
&& _dl_name_match_p (GLRO(dl_profile), map))
/* This is the object we are looking for. Say that we really
want profiling and the timers are started. */
GL(dl_profile_map) = map;
+#else
+ dlrr = (Elf32_Word) _dl_runtime_resolve;
+#endif
/* For the long entries, subtract off data_words. */
tramp[0] = OPCODE_ADDIS_HI (11, 11, -data_words);
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 20 ++++++++++++++++++++
sysdeps/powerpc/powerpc32/dl-machine.c | 13 +++++++++----
sysdeps/powerpc/powerpc32/dl-start.S | 7 +++----
sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S | 9 +++++++--
sysdeps/powerpc/powerpc32/fpu/setjmp-common.S | 8 +++++++-
sysdeps/powerpc/powerpc64/__longjmp-common.S | 8 +++++++-
sysdeps/powerpc/powerpc64/dl-machine.h | 10 +++++-----
sysdeps/powerpc/powerpc64/dl-trampoline.S | 6 +++---
sysdeps/powerpc/powerpc64/setjmp-common.S | 8 +++++++-
9 files changed, 68 insertions(+), 21 deletions(-)
hooks/post-receive
--
GNU C Library master sources