[PATCH] Fix _dl_reloc_bad_type, take 2

Jakub Jelinek jakub@redhat.com
Wed May 10 03:15:00 GMT 2000


Hi!

Forget the last patch and take this one instead. There was one more bug.

2000-05-10  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-reloc.c (_dl_reloc_bad_type): Write type into the message
	at proper place.  Compute the high nibble correctly.

--- libc/elf/dl-reloc.c.jj	Mon May  8 08:22:14 2000
+++ libc/elf/dl-reloc.c	Wed May 10 11:50:58 2000
@@ -158,15 +158,15 @@ _dl_reloc_bad_type (struct link_map *map
   if (plt)
     {
       char msg[] = "unexpected reloc type 0x??";
-      msg[sizeof msg - 2] = DIGIT(type >> 8);
-      msg[sizeof msg - 1] = DIGIT(type);
+      msg[sizeof msg - 3] = DIGIT(type >> 4);
+      msg[sizeof msg - 2] = DIGIT(type);
       _dl_signal_error (0, map->l_name, msg);
     }
   else
     {
       char msg[] = "unexpected PLT reloc type 0x??";
-      msg[sizeof msg - 2] = DIGIT(type >> 8);
-      msg[sizeof msg - 1] = DIGIT(type);
+      msg[sizeof msg - 3] = DIGIT(type >> 4);
+      msg[sizeof msg - 2] = DIGIT(type);
       _dl_signal_error (0, map->l_name, msg);
     }
 }

	Jakub


More information about the Libc-hacker mailing list