]> sourceware.org Git - glibc.git/commitdiff
[AArch64] Adjust elf_machine_dynamic to find _DYNAMIC via _GLOBAL_OFFSET_TABLE_
authorMarcus Shawcroft <marcus.shawcroft@linaro.org>
Fri, 28 Jun 2013 10:27:26 +0000 (11:27 +0100)
committerMarcus Shawcroft <marcus.shawcroft@linaro.org>
Fri, 28 Jun 2013 10:27:26 +0000 (11:27 +0100)
ports/ChangeLog.aarch64
ports/sysdeps/aarch64/dl-machine.h

index 25424bbc82d16dc27a57aeff8b687be8f6b228d9..25276218e1685d8a3932046d5b70579bd8aaa906 100644 (file)
@@ -1,3 +1,8 @@
+2013-06-28  Marcus Shawcroft  <marcus.shawcroft@linaro.org>
+
+       * sysdeps/aarch64/dl-machine.h (elf_machine_dynamic): De-reference
+       _GLOBAL_OFFSET_TABLE_.
+
 2013-06-28  Marcus Shawcroft  <marcus.shawcroft@linaro.org>
 
        * sysdeps/unix/sysv/linux/aarch64/getcontext.S (__getcontext): Simplify
index c91b0c42e02becb34874938997289d8c66ab7f55..71dd6b3894c998c76526478e673c478b0027b88a 100644 (file)
@@ -36,8 +36,8 @@ elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
 static inline ElfW(Addr) __attribute__ ((unused))
 elf_machine_dynamic (void)
 {
-  ElfW(Addr) addr = (ElfW(Addr)) &_DYNAMIC;
-  return addr;
+  extern const ElfW(Addr) _GLOBAL_OFFSET_TABLE_[] attribute_hidden;
+  return _GLOBAL_OFFSET_TABLE_[0];
 }
 
 /* Return the run-time load address of the shared object.  */
This page took 0.047006 seconds and 5 git commands to generate.