This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.17-619-g1a0fc08


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  1a0fc08754ad83ae0a755f8c1bd8d0346494daba (commit)
      from  e8dd47916fdb437ae44163719e6e876f9073e5d4 (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1a0fc08754ad83ae0a755f8c1bd8d0346494daba

commit 1a0fc08754ad83ae0a755f8c1bd8d0346494daba
Author: Roland McGrath <roland@hack.frob.com>
Date:   Tue May 7 10:29:13 2013 -0700

    ARM: Rewrite elf_machine_dynamic in pure C.

diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm
index 25981d7..3f504e4 100644
--- a/ports/ChangeLog.arm
+++ b/ports/ChangeLog.arm
@@ -1,3 +1,8 @@
+2013-05-07  Roland McGrath  <roland@hack.frob.com>
+
+	* sysdeps/arm/dl-machine.h (elf_machine_dynamic): Use a plain C
+	reference to _GLOBAL_OFFSET_TABLE_ with an STV_HIDDEN declaration.
+
 2013-05-06  Roland McGrath  <roland@hack.frob.com>
 
 	* sysdeps/arm/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Add missing sfi_breg.
diff --git a/ports/sysdeps/arm/dl-machine.h b/ports/sysdeps/arm/dl-machine.h
index 5a424f8..6e09aa1 100644
--- a/ports/sysdeps/arm/dl-machine.h
+++ b/ports/sysdeps/arm/dl-machine.h
@@ -39,30 +39,13 @@ elf_machine_matches_host (const Elf32_Ehdr *ehdr)
 
 
 /* Return the link-time address of _DYNAMIC.  Conveniently, this is the
-   first element of the GOT.  We used to use the PIC register to do this
-   without a constant pool reference, but GCC 4.2 will use a pseudo-register
-   for the PIC base, so it may not be in r10.  */
+   first element of the GOT.  */
 static inline Elf32_Addr __attribute__ ((unused))
 elf_machine_dynamic (void)
 {
-  Elf32_Addr dynamic;
-#ifdef __thumb2__
-  long tmp;
-  asm ("ldr\t%0, 1f\n\t"
-       "adr\t%1, 1f\n\t"
-       "ldr\t%0, [%0, %1]\n\t"
-       "b 2f\n"
-       ".align 2\n"
-       "1: .word _GLOBAL_OFFSET_TABLE_ - 1b\n"
-       "2:" : "=r" (dynamic), "=r"(tmp));
-#else
-  asm ("ldr %0, 2f\n"
-       "1: ldr %0, [pc, %0]\n"
-       "b 3f\n"
-       "2: .word _GLOBAL_OFFSET_TABLE_ - (1b+8)\n"
-       "3:" : "=r" (dynamic));
-#endif
-  return dynamic;
+  /* Declaring this hidden ensures that a PC-relative reference is used.  */
+  extern const Elf32_Addr _GLOBAL_OFFSET_TABLE_[] attribute_hidden;
+  return _GLOBAL_OFFSET_TABLE_[0];
 }
 
 

-----------------------------------------------------------------------

Summary of changes:
 ports/ChangeLog.arm            |    5 +++++
 ports/sysdeps/arm/dl-machine.h |   25 ++++---------------------
 2 files changed, 9 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]