Update.
authorUlrich Drepper <drepper@redhat.com>
Fri, 25 Oct 2002 07:54:26 +0000 (07:54 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 25 Oct 2002 07:54:26 +0000 (07:54 +0000)
2002-10-23  Alexandre Oliva  <aoliva@redhat.com>

* elf/dl-reloc.c (_dl_reloc_bad_use): Print the full 32-bit relocation
type on ELF64 platforms.

ChangeLog
elf/dl-reloc.c

index 0b03081..fa9245f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-10-23  Alexandre Oliva  <aoliva@redhat.com>
+
+       * elf/dl-reloc.c (_dl_reloc_bad_use): Print the full 32-bit relocation
+       type on ELF64 platforms.
+
 2002-10-24  Ulrich Drepper  <drepper@redhat.com>
 
        * elf/elf.h (R_X86_64_GOTTPOFF): Renamed from r_x86_64_GOTTPOFF.
index d6db62b..16017b3 100644 (file)
@@ -225,12 +225,27 @@ _dl_reloc_bad_type (struct link_map *map, unsigned int type, int plt)
 #define DIGIT(b)       INTUSE(_itoa_lower_digits)[(b) & 0xf];
 
   /* XXX We cannot translate these messages.  */
-  static const char msg[2][32] = { "unexpected reloc type 0x",
-                                  "unexpected PLT reloc type 0x" };
+  static const char msg[2][32
+#if __ELF_NATIVE_CLASS == 64
+                          + 6
+#endif
+  ] = { "unexpected reloc type 0x",
+       "unexpected PLT reloc type 0x" };
   char msgbuf[sizeof (msg[0])];
   char *cp;
 
   cp = __stpcpy (msgbuf, msg[plt]);
+#if __ELF_NATIVE_CLASS == 64
+  if (__builtin_expect(type > 0xff, 0))
+    {
+      *cp++ = DIGIT (type >> 28);
+      *cp++ = DIGIT (type >> 24);
+      *cp++ = DIGIT (type >> 20);
+      *cp++ = DIGIT (type >> 16);
+      *cp++ = DIGIT (type >> 12);
+      *cp++ = DIGIT (type >> 8);
+    }
+#endif
   *cp++ = DIGIT (type >> 4);
   *cp++ = DIGIT (type);
   *cp = '\0';