bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

hpux archive generation


From: ZIGLIO, Frediano, VF-IT
Subject: hpux archive generation
Date: Wed, 23 Aug 2006 11:20:22 +0200

Well, 
  I was trying to build a cross toolchains and ar
(hppa64-hp-hpux11.00-ar) crashed compiling. I have a big uid and I
discover that this cause a core in bfd/archive.c. I think the following
fix is clear enough.

diff -r -U10 binutils-2.17/bfd/archive.c binutils-2.17.my/bfd/archive.c
--- binutils-2.17/bfd/archive.c 2005-10-05 23:24:23.000000000 +0200
+++ binutils-2.17.my/bfd/archive.c      2006-08-23 10:52:43.060952568
+0200
@@ -1332,21 +1332,21 @@
 /* Function to encode large UID/GID values according to HP.  */

 static void
 hpux_uid_gid_encode (char str[6], long int id)
 {
   int cnt;

   str[5] = '@' + (id & 3);
   id >>= 2;

-  for (cnt = 4; cnt >= 0; ++cnt, id >>= 6)
+  for (cnt = 4; cnt >= 0; --cnt, id >>= 6)
     str[cnt] = ' ' + (id & 0x3f);
 }
 #endif /* HPUX_LARGE_AR_IDS */

 #ifndef HAVE_GETUID
 #define getuid() 0
 #endif

 #ifndef HAVE_GETGID
 #define getgid() 0

bye
  freddy77





reply via email to

[Prev in Thread] Current Thread [Next in Thread]