mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-09 23:00:07 +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>
|
||||
|
||||
* 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
|
||||
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@GOT.w(%%a5), %0"
|
||||
: "=a" (addr));
|
||||
return addr;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user