]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix R_X86_64_PC32 overflow detection
authorRichard Guenther <rguenther@suse.de>
Fri, 5 Mar 2010 03:33:41 +0000 (19:33 -0800)
committerUlrich Drepper <drepper@redhat.com>
Fri, 5 Mar 2010 03:33:41 +0000 (19:33 -0800)
ChangeLog
sysdeps/x86_64/dl-machine.h

index 1946aa666b7976cfa01987cdb53c294fd030b5ee..eac8ecd96556c24a60c475d6675c28eeae6f1ef9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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-03-03  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/unix/sysv/linux/bits/in.h: Add a few more definitions from
index 61a0556d5e4b6a7e119ce68a6470a9389e23b924..f615e9591ffd5eeff6dcc81e55a9d5766a680392 100644 (file)
@@ -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";