This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] x86_64 dl-machine.h fix


Hi!

R_X86_64_PC32 is sword32, not uword32...

2003-02-21  Jakub Jelinek  <jakub at redhat dot com>

	* sysdeps/x86_64/dl-machine.h (elf_machine_rela) <R_X86_64_PC32>:
	Check for signed overflow, not unsigned.

--- libc/sysdeps/x86_64/dl-machine.h.jj	2002-10-21 13:15:01.000000000 -0400
+++ libc/sysdeps/x86_64/dl-machine.h	2003-02-21 11:05:47.000000000 -0500
@@ -1,5 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  x86-64 version.
-   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj at suse dot de>.
 
@@ -463,7 +463,7 @@ elf_machine_rela (struct link_map *map, 
 	  *(unsigned int *) reloc_addr = value + reloc->r_addend
 	    - (Elf64_Addr) reloc_addr;
 	  if (value + reloc->r_addend - (Elf64_Addr) reloc_addr
-	      != (unsigned int)(value + reloc->r_addend - (Elf64_Addr) reloc_addr))
+	      != (int)(value + reloc->r_addend - (Elf64_Addr) reloc_addr))
 	    {
 	      const char *strtab;
 

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]