From 5e087c7152841153da9c696df8596684e359c755 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 1 Jul 2000 05:19:18 +0000 Subject: Update. * assert/Depend: Add localedata. * assert/Makefile (test-assert-ENV): New. Define LANGUAGE=C. (test-assert-perr-ENV): New. Define LANGUAGE=C. * sysdeps/alpha/dl-machine.h (elf_machine_rela) [r_type == R_ALPHA_REFQUAD]: Use memcpy to load and store value from relocation address to prevent unaligned trap. Suggested by Richard Henderson . 2000-06-30 Jakub Jelinek * io/sys/stat.h (stat64, lstat64, fstat64): Don't define inlines if redirecting and either redirection is done using defines or not optimizing. 2000-06-30 Ulrich Drepper --- sysdeps/alpha/dl-machine.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sysdeps/alpha/dl-machine.h') diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index e20493b33f..a7f13e0192 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -500,7 +500,12 @@ elf_machine_rela (struct link_map *map, elf_machine_fixup_plt (map, NULL, reloc, reloc_addr, sym_value); else if (r_type == R_ALPHA_REFQUAD) { - sym_value += *reloc_addr; + void *reloc_addr_1 = reloc_addr; + Elf64_Addr reloc_addr_val; + + /* Load value without causing unaligned trap. */ + memcpy (&reloc_addr_val, reloc_addr_1, 8); + sym_value += reloc_addr_val; #ifndef RTLD_BOOTSTRAP if (map == &_dl_rtld_map) { @@ -516,7 +521,8 @@ elf_machine_rela (struct link_map *map, sym_value -= reloc->r_addend; } #endif - *reloc_addr = sym_value; + /* Store value without causing unaligned trap. */ + memcpy (reloc_addr_1, &sym_value, 8); } else _dl_reloc_bad_type (map, r_type, 0); -- cgit 1.4.1