diff options
author | Richard Guenther <rguenther@suse.de> | 2010-03-04 19:33:41 -0800 |
---|---|---|
committer | Petr Baudis <pasky@ucw.cz> | 2010-05-12 02:08:49 +0200 |
commit | 7dab764e6058b7383d76f0ba2b63ae3afbafd4ba (patch) | |
tree | 372c6bf415699bbbb8ecb550b5e88682ff5e0913 | |
parent | a82e74eb468e899f7ebe4204eefa04a967002f77 (diff) | |
download | glibc-7dab764e6058b7383d76f0ba2b63ae3afbafd4ba.zip glibc-7dab764e6058b7383d76f0ba2b63ae3afbafd4ba.tar.gz glibc-7dab764e6058b7383d76f0ba2b63ae3afbafd4ba.tar.bz2 |
Fix R_X86_64_PC32 overflow detection
(cherry picked from commit e39acb1f165c467e99509146c95f69c7444521e3)
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | sysdeps/x86_64/dl-machine.h | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2010-03-02 Richard Guenther <rguenther@suse.de> + + * sysdeps/x86_64/dl-machine.h (elf_machine_rela): R_X86_64_PC32 + is sign-extending. + 2010-02-24 Ulrich Drepper <drepper@redhat.com> [BZ #11319] diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h index 61a0556..f615e95 100644 --- a/sysdeps/x86_64/dl-machine.h +++ b/sysdeps/x86_64/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. x86-64 version. - Copyright (C) 2001-2005, 2006, 2008, 2009 Free Software Foundation, Inc. + Copyright (C) 2001-2006, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger <aj@suse.de>. @@ -419,7 +419,7 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, case R_X86_64_PC32: value += reloc->r_addend - (Elf64_Addr) reloc_addr; *(unsigned int *) reloc_addr = value; - if (__builtin_expect (value != (unsigned int) value, 0)) + if (__builtin_expect (value != (int) value, 0)) { fmt = "\ %s: Symbol `%s' causes overflow in R_X86_64_PC32 relocation\n"; |