[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r5746 - in /branches/eglibc-2_7/ports: ChangeLog.eglibc sysdeps/m68k/dl-machine.h



Author: maxim
Date: Tue Apr  1 01:09:05 2008
New Revision: 5746

Log:
	Backport from trunk.
	2008-03-28  Maxim Kuvyrkov  <maxim@xxxxxxxxxxxxxxxx>
	
	Explicitly get address of _DYNAMIC.
	* sysdeps/m68k/dl-machine.h (elf_machine_dynamic): Retrieve _DYNAMIC
	from GOT instead of assuming value at GOT pointer.

Modified:
    branches/eglibc-2_7/ports/ChangeLog.eglibc
    branches/eglibc-2_7/ports/sysdeps/m68k/dl-machine.h

Modified: branches/eglibc-2_7/ports/ChangeLog.eglibc
==============================================================================
--- branches/eglibc-2_7/ports/ChangeLog.eglibc (original)
+++ branches/eglibc-2_7/ports/ChangeLog.eglibc Tue Apr  1 01:09:05 2008
@@ -1,3 +1,12 @@
+2008-04-01  Maxim Kuvyrkov  <maxim@xxxxxxxxxxxxxxxx>
+
+	Backport from trunk.
+	2008-03-28  Maxim Kuvyrkov  <maxim@xxxxxxxxxxxxxxxx>
+	
+	Explicitly get address of _DYNAMIC.
+	* sysdeps/m68k/dl-machine.h (elf_machine_dynamic): Retrieve _DYNAMIC
+	from GOT instead of assuming value at GOT pointer.
+
 2008-03-26  David Stephenson  <david.stephenson@xxxxxxxxxxxx>
 	    Daniel Jacobowitz  <dan@xxxxxxxxxxxxxxxx>
 

Modified: branches/eglibc-2_7/ports/sysdeps/m68k/dl-machine.h
==============================================================================
--- branches/eglibc-2_7/ports/sysdeps/m68k/dl-machine.h (original)
+++ branches/eglibc-2_7/ports/sysdeps/m68k/dl-machine.h Tue Apr  1 01:09:05 2008
@@ -33,14 +33,16 @@
 }
 
 
-/* Return the link-time address of _DYNAMIC.  Conveniently, this is the
-   first element of the GOT.  This must be inlined in a function which
-   uses global data.  */
+/* Return the link-time address of _DYNAMIC.
+   This must be inlined in a function which uses global data.  */
 static inline Elf32_Addr
 elf_machine_dynamic (void)
 {
-  register Elf32_Addr *got asm ("%a5");
-  return *got;
+  Elf32_Addr addr;
+
+  asm ("move.l _DYNAMIC@xxxxx(%%a5), %0"
+       : "=a" (addr));
+  return addr;
 }