mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-10 19:30:10 +00:00
2008-03-28 Maxim Kuvyrkov <maxim@codesourcery.com>
Explicitly get address of _DYNAMIC. * sysdeps/m68k/dl-machine.h (elf_machine_dynamic): Retrieve _DYNAMIC from GOT instead of assuming value at GOT pointer.
This commit is contained in:
parent
285e04f887
commit
04d6ca32f1
@ -1,3 +1,9 @@
|
|||||||
|
2008-03-28 Maxim Kuvyrkov <maxim@codesourcery.com>
|
||||||
|
|
||||||
|
Explicitly get address of _DYNAMIC.
|
||||||
|
* sysdeps/m68k/dl-machine.h (elf_machine_dynamic): Retrieve _DYNAMIC
|
||||||
|
from GOT instead of assuming value at GOT pointer.
|
||||||
|
|
||||||
2007-10-22 Daniel Jacobowitz <dan@codesourcery.com>
|
2007-10-22 Daniel Jacobowitz <dan@codesourcery.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (F_DUPFD_CLOEXEC): Define.
|
* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (F_DUPFD_CLOEXEC): Define.
|
||||||
|
@ -33,14 +33,16 @@ elf_machine_matches_host (const Elf32_Ehdr *ehdr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Return the link-time address of _DYNAMIC. Conveniently, this is the
|
/* Return the link-time address of _DYNAMIC.
|
||||||
first element of the GOT. This must be inlined in a function which
|
This must be inlined in a function which uses global data. */
|
||||||
uses global data. */
|
|
||||||
static inline Elf32_Addr
|
static inline Elf32_Addr
|
||||||
elf_machine_dynamic (void)
|
elf_machine_dynamic (void)
|
||||||
{
|
{
|
||||||
register Elf32_Addr *got asm ("%a5");
|
Elf32_Addr addr;
|
||||||
return *got;
|
|
||||||
|
asm ("move.l _DYNAMIC@GOT.w(%%a5), %0"
|
||||||
|
: "=a" (addr));
|
||||||
|
return addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user