Skip to content

Commit

Permalink
* sysdeps/unix/sysv/linux/x86_64/sysdep.h (PTR_MANGLE): Define C
Browse files Browse the repository at this point in the history
	version for inside ld.so.

	* elf/rtld.c (dl_main): Don't use hp timing code unless it's available.
  • Loading branch information
Ulrich Drepper committed Dec 18, 2005
1 parent d87921e commit 7725f87
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
2005-12-18 Ulrich Drepper <drepper@redhat.com>

* sysdeps/unix/sysv/linux/x86_64/sysdep.h (PTR_MANGLE): Define C
version for inside ld.so.

* elf/rtld.c (dl_main): Don't use hp timing code unless it's available.

* sysdeps/powerpc/powerpc32/setjmp-common.S [IS_IN_rtld]: Avoid
call to __sigjmp_save.
* sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise.
Expand Down
6 changes: 4 additions & 2 deletions elf/rtld.c
Original file line number Diff line number Diff line change
Expand Up @@ -1837,10 +1837,12 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
if (GLRO(dl_pointer_guard))
{
// XXX If it is cheap, we should use a separate value.
uintptr_t pointer_chk_guard;
uintptr_t pointer_chk_guard = stack_chk_guard;
#ifndef HP_TIMING_NONAVAIL
hp_timing_t now;
HP_TIMING_NOW (now);
pointer_chk_guard = stack_chk_guard ^ now;
pointer_chk_guard ^= now;
#endif
#ifdef THREAD_SET_POINTER_GUARD
THREAD_SET_POINTER_GUARD (pointer_chk_guard);
#endif
Expand Down
4 changes: 3 additions & 1 deletion sysdeps/unix/sysv/linux/x86_64/sysdep.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,9 @@
# define PTR_MANGLE(reg) xorq __pointer_chk_guard_local(%rip), reg
# define PTR_DEMANGLE(reg) PTR_MANGLE (reg)
# else
# error "Define these if necessary"
# define PTR_MANGLE(reg) asm ("xorq __pointer_chk_guard_local(%%rip), %0"\
: "=r" (reg) : "0" (reg))
# define PTR_DEMANGLE(reg) PTR_MANGLE (reg)
# endif
#else
# ifdef __ASSEMBLER__
Expand Down

0 comments on commit 7725f87

Please sign in to comment.