Problem with ldconfig

Andreas Jaeger aj@suse.de
Mon Sep 18 23:44:00 GMT 2000


Thorsten reported me a problem with ldconfig on Sparc64 systems - the
output from 32bit ldconfig and from 64bit ldconfig are not the same,
the tools/libs are not interoperable.

The problem is the hwcap entry in struct file_entry_new - it was
unsigned long.  I'm using now uint64_t on all platforms as smallest
common format.

At the momement the struct is:
struct file_entry_new
{
  int flags;			/* This is 1 for an ELF library.  */
  unsigned int key, value;	/* String table indices.  */
  unsigned long hwcap;		/* Hwcap entry.  */
};

I like to use the following for file_entry_new:

struct file_entry_new
{
  int32_t flags;		/* This is 1 for an ELF library.  */
  uint32_t key, value;		/* String table indices.  */
  uint32_t __unused;            /* Align next field always on 8 byte boundary.  */
  uint64_t hwcap;		/* Hwcap entry.  */
};

What do you think?  Shall I go ahead and make a complete patch?  Or do
you prefer another solution.  

Btw. these changes will imply an increment of the ldconfig version number.

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


More information about the Libc-hacker mailing list