This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


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] PowerPC: Use correct PLT relocations for elf_machine_type_class.


Patch courtesy of Alan Modra.  I successfully executed make check
against ppc32 and ppc64.

Ryan S. Arnold
IBM Linux Technology Center
Linux Toolchain Development
2008-02-19  Alan Modra  <amodra@bigpond.net.au>

	* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_type_class):
	Use correct PLT relocation.

--- libc/sysdeps/powerpc/powerpc64/dl-machine.h	2006-10-27 18:11:46.000000000 -0500
+++ libc-patched/sysdeps/powerpc/powerpc64/dl-machine.h	2008-02-19 10:08:17.000000000 -0600
@@ -263,11 +263,11 @@
 #define elf_machine_type_class(type)					      \
   /* This covers all the TLS relocs, though most won't appear.  */	      \
   (((((type) >= R_PPC64_DTPMOD64 && (type) <= R_PPC64_TPREL16_HIGHESTA)	      \
-    || (type) == R_PPC64_ADDR24) * ELF_RTYPE_CLASS_PLT)			      \
+    || (type) == R_PPC64_JMP_SLOT) * ELF_RTYPE_CLASS_PLT)			      \
    | (((type) == R_PPC64_COPY) * ELF_RTYPE_CLASS_COPY))
 #else
 #define elf_machine_type_class(type) \
-  ((((type) == R_PPC64_ADDR24) * ELF_RTYPE_CLASS_PLT)	\
+  ((((type) == R_PPC64_JMP_SLOT) * ELF_RTYPE_CLASS_PLT)	\
    | (((type) == R_PPC64_COPY) * ELF_RTYPE_CLASS_COPY))
 #endif
 

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