* sysdeps/sh/dl-machine.h (elf_machine_rela): Remove code using
RESOLVE. 2005-02-07 Ulrich Drepper <drepper@redhat.com> * elf/dl-load.c (_dl_map_object_from_fd): Makre sure registers are set correctly. * sysdeps/unix/sysv/linux/i386/sysdep.h (check_consistency): Define.
This commit is contained in:
parent
dbfc1e0267
commit
606832e6e5
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2005-02-08 Kaz Kojima <kkojima@rr.iij4u.or.jp>
|
||||||
|
|
||||||
|
* sysdeps/sh/dl-machine.h (elf_machine_rela): Remove code using
|
||||||
|
RESOLVE.
|
||||||
|
|
||||||
|
2005-02-07 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* elf/dl-load.c (_dl_map_object_from_fd): Makre sure registers are
|
||||||
|
set correctly.
|
||||||
|
|
||||||
2005-01-07 Richard Henderson <rth@redhat.com>
|
2005-01-07 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
* math/math_private.h (__copysign): Define as builtin for gcc 4.
|
* math/math_private.h (__copysign): Define as builtin for gcc 4.
|
||||||
|
@ -26,6 +36,8 @@
|
||||||
|
|
||||||
* iconv/iconv_prog.c (main): Provide more help in case on an error.
|
* iconv/iconv_prog.c (main): Provide more help in case on an error.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/i386/sysdep.h (check_consistency): Define.
|
||||||
|
|
||||||
2005-02-07 Jakub Jelinek <jakub@redhat.com>
|
2005-02-07 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* nscd/nscd.c (termination_handler): Avoid segfault if some database
|
* nscd/nscd.c (termination_handler): Avoid segfault if some database
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include <dl-osinfo.h>
|
#include <dl-osinfo.h>
|
||||||
#include <stackinfo.h>
|
#include <stackinfo.h>
|
||||||
#include <caller.h>
|
#include <caller.h>
|
||||||
|
#include <sysdep.h>
|
||||||
|
|
||||||
#include <dl-dst.h>
|
#include <dl-dst.h>
|
||||||
|
|
||||||
|
@ -1373,6 +1374,10 @@ cannot allocate TLS data structures for initial thread");
|
||||||
#endif
|
#endif
|
||||||
__stack_prot |= PROT_READ|PROT_WRITE|PROT_EXEC;
|
__stack_prot |= PROT_READ|PROT_WRITE|PROT_EXEC;
|
||||||
|
|
||||||
|
#ifdef check_consistency
|
||||||
|
check_consistency ();
|
||||||
|
#endif
|
||||||
|
|
||||||
errval = (*GL(dl_make_stack_executable_hook)) (stack_endp);
|
errval = (*GL(dl_make_stack_executable_hook)) (stack_endp);
|
||||||
if (errval)
|
if (errval)
|
||||||
{
|
{
|
||||||
|
|
|
@ -323,15 +323,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const Elf32_Sym *const refsym = sym;
|
const Elf32_Sym *const refsym = sym;
|
||||||
#ifndef RTLD_BOOTSTRAP
|
|
||||||
struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
|
struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
|
||||||
|
|
||||||
value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
|
value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value;
|
||||||
#else
|
|
||||||
|
|
||||||
value = RESOLVE (&sym, version, r_type);
|
|
||||||
value += sym->st_value;
|
|
||||||
#endif
|
|
||||||
value += reloc->r_addend;
|
value += reloc->r_addend;
|
||||||
|
|
||||||
switch (r_type)
|
switch (r_type)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Stack executability handling for GNU dynamic linker. Linux version.
|
/* Stack executability handling for GNU dynamic linker. Linux version.
|
||||||
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
|
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -24,6 +24,7 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stackinfo.h>
|
#include <stackinfo.h>
|
||||||
#include <caller.h>
|
#include <caller.h>
|
||||||
|
#include <sysdep.h>
|
||||||
|
|
||||||
#include "kernel-features.h"
|
#include "kernel-features.h"
|
||||||
|
|
||||||
|
@ -38,6 +39,7 @@ _dl_make_stack_executable (void **stack_endp)
|
||||||
/* This gives us the highest/lowest page that needs to be changed. */
|
/* This gives us the highest/lowest page that needs to be changed. */
|
||||||
uintptr_t page = ((uintptr_t) *stack_endp
|
uintptr_t page = ((uintptr_t) *stack_endp
|
||||||
& -(intptr_t) GLRO(dl_pagesize));
|
& -(intptr_t) GLRO(dl_pagesize));
|
||||||
|
int result = 0;
|
||||||
|
|
||||||
/* Challenge the caller. */
|
/* Challenge the caller. */
|
||||||
if (__builtin_expect (__check_caller (RETURN_ADDRESS (0),
|
if (__builtin_expect (__check_caller (RETURN_ADDRESS (0),
|
||||||
|
@ -60,7 +62,10 @@ _dl_make_stack_executable (void **stack_endp)
|
||||||
no_growsupdown = true;
|
no_growsupdown = true;
|
||||||
else
|
else
|
||||||
# endif
|
# endif
|
||||||
return errno;
|
{
|
||||||
|
result = errno;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -85,7 +90,10 @@ _dl_make_stack_executable (void **stack_endp)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (errno != ENOMEM) /* Unexpected failure mode. */
|
if (errno != ENOMEM) /* Unexpected failure mode. */
|
||||||
return errno;
|
{
|
||||||
|
result = errno;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
if (size == GLRO(dl_pagesize))
|
if (size == GLRO(dl_pagesize))
|
||||||
/* We just tried to mprotect the top hole page and failed.
|
/* We just tried to mprotect the top hole page and failed.
|
||||||
|
@ -108,7 +116,10 @@ _dl_make_stack_executable (void **stack_endp)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (errno != ENOMEM) /* Unexpected failure mode. */
|
if (errno != ENOMEM) /* Unexpected failure mode. */
|
||||||
return errno;
|
{
|
||||||
|
result = errno;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
if (size == GLRO(dl_pagesize))
|
if (size == GLRO(dl_pagesize))
|
||||||
/* We just tried to mprotect the lowest hole page and failed.
|
/* We just tried to mprotect the lowest hole page and failed.
|
||||||
|
@ -133,6 +144,11 @@ _dl_make_stack_executable (void **stack_endp)
|
||||||
/* Remember that we changed the permission. */
|
/* Remember that we changed the permission. */
|
||||||
GL(dl_stack_flags) |= PF_X;
|
GL(dl_stack_flags) |= PF_X;
|
||||||
|
|
||||||
return 0;
|
out:
|
||||||
|
#ifdef check_consistency
|
||||||
|
check_consistency ();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
rtld_hidden_def (_dl_make_stack_executable)
|
rtld_hidden_def (_dl_make_stack_executable)
|
||||||
|
|
Loading…
Reference in New Issue