aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-10-25 07:54:26 +0000
committerUlrich Drepper <drepper@redhat.com>2002-10-25 07:54:26 +0000
commit584364156bf97dc81aa1ce8031f9028c5906379f (patch)
treea46d01f3c828795903512a5ed013c5785639e44b /elf
parent14fa2b09c68360fab05968e89aba6db1f715960e (diff)
downloadglibc-584364156bf97dc81aa1ce8031f9028c5906379f.tar
glibc-584364156bf97dc81aa1ce8031f9028c5906379f.tar.gz
glibc-584364156bf97dc81aa1ce8031f9028c5906379f.tar.bz2
glibc-584364156bf97dc81aa1ce8031f9028c5906379f.zip
Update.
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.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-reloc.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index d6db62b11e..16017b3933 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -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';