OSDN Git Service

Fix function prototype to match the official ELF standard hash function
authorEric Andersen <andersen@codepoet.org>
Tue, 10 Feb 2004 11:47:57 +0000 (11:47 -0000)
committerEric Andersen <andersen@codepoet.org>
Tue, 10 Feb 2004 11:47:57 +0000 (11:47 -0000)
ldso/include/dl-hash.h
ldso/ldso/dl-hash.c

index 246ed26..2d41e00 100644 (file)
@@ -75,7 +75,7 @@ extern int _dl_linux_dynamic_link(void);
 
 extern char * _dl_library_path;
 extern char * _dl_not_lazy;
-extern unsigned long _dl_elf_hash(const char * name);
+extern unsigned long _dl_elf_hash(const unsigned char *name);
 
 static inline int _dl_symbol(char * name)
 {
index c33b329..f69f0c1 100644 (file)
@@ -57,7 +57,7 @@ struct dyn_elf *_dl_handles = NULL;
 /* This is the hash function that is used by the ELF linker to generate the
  * hash table that each executable and library is required to have.  We need
  * it to decode the hash table.  */
-unsigned long _dl_elf_hash(const char *name)
+unsigned long _dl_elf_hash(const unsigned char *name)
 {
        unsigned long hash = 0;
        unsigned long tmp;
@@ -67,7 +67,7 @@ unsigned long _dl_elf_hash(const char *name)
                if ((tmp = hash & 0xf0000000))
                        hash ^= tmp >> 24;
                hash &= ~tmp;
-       };
+       }
        return hash;
 }