* elf.c (bfd_elf_hash): Change parameter from unsigned char * to
authorIan Lance Taylor <ian@airs.com>
Sun, 11 Jul 1999 17:13:36 +0000 (17:13 +0000)
committerIan Lance Taylor <ian@airs.com>
Sun, 11 Jul 1999 17:13:36 +0000 (17:13 +0000)
char *.
* elf-bfd.h (bfd_elf_hash): Update declaration.
* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove casts
when calling bfd_elf_hash.

bfd/ChangeLog
bfd/elf-bfd.h
bfd/elf.c
bfd/elflink.h

index 8d327d29c72153b2991f79be4ccda287a254c9df..f9421e591978e755036c9fc4e87de82baf3734cc 100644 (file)
@@ -1,3 +1,11 @@
+1999-07-11  Ian Lance Taylor  <ian@zembu.com>
+
+       * elf.c (bfd_elf_hash): Change parameter from unsigned char * to
+       char *.
+       * elf-bfd.h (bfd_elf_hash): Update declaration.
+       * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove casts
+       when calling bfd_elf_hash.
+
 1999-07-11  Mark Mitchell  <mark@codesourcery.com>
 
        * libbfd.c (bfd_put_8): Make it of type `void'.
index 402d75e42e9dd5efaebf3580c5d43549143fe098..be6185b68fc0b1a2458e84d330a53ec974816e1f 100644 (file)
@@ -877,7 +877,7 @@ extern void bfd_elf_print_symbol PARAMS ((bfd *, PTR, asymbol *,
 #define bfd_elf32_print_symbol bfd_elf_print_symbol
 #define bfd_elf64_print_symbol bfd_elf_print_symbol
 
-extern unsigned long bfd_elf_hash PARAMS ((CONST unsigned char *));
+extern unsigned long bfd_elf_hash PARAMS ((const char *));
 
 extern bfd_reloc_status_type bfd_elf_generic_reloc PARAMS ((bfd *,
                                                            arelent *,
index 4db37c46850765ae2f2297089d442d3f30e40e95..65bba6124aac5c75505e2e70c2154803c2356436 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -200,10 +200,12 @@ _bfd_elf_swap_versym_out (abfd, src, dst)
 
 /* Standard ELF hash function.  Do not change this function; you will
    cause invalid hash tables to be generated.  */
+
 unsigned long
-bfd_elf_hash (name)
-     CONST unsigned char *name;
+bfd_elf_hash (namearg)
+     const char *namearg;
 {
+  const unsigned char *name = (const unsigned char *) namearg;
   unsigned long h = 0;
   unsigned long g;
   int ch;
index db536c913478fdfe4bd43eab92a3f2de005922c9..fc07d7d8eae79d0ce84dfc92c722300520565b52 100644 (file)
@@ -2800,7 +2800,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
 
          if (soname_indx != (bfd_size_type) -1)
            {
-             def.vd_hash = bfd_elf_hash ((const unsigned char *) soname);
+             def.vd_hash = bfd_elf_hash (soname);
              defaux.vda_name = soname_indx;
            }
          else
@@ -2809,7 +2809,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
              bfd_size_type indx;
 
              name = output_bfd->filename;
-             def.vd_hash = bfd_elf_hash ((const unsigned char *) name);
+             def.vd_hash = bfd_elf_hash (name);
              indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr,
                                            name, true, false);
              if (indx == (bfd_size_type) -1)
@@ -2857,7 +2857,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
                def.vd_flags |= VER_FLG_WEAK;
              def.vd_ndx = t->vernum + 1;
              def.vd_cnt = cdeps + 1;
-             def.vd_hash = bfd_elf_hash ((const unsigned char *) t->name);
+             def.vd_hash = bfd_elf_hash (t->name);
              def.vd_aux = sizeof (Elf_External_Verdef);
              if (t->next != NULL)
                def.vd_next = (sizeof (Elf_External_Verdef)
@@ -2993,8 +2993,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
 
                for (a = t->vn_auxptr; a != NULL; a = a->vna_nextptr)
                  {
-                   a->vna_hash = bfd_elf_hash ((const unsigned char *)
-                                               a->vna_nodename);
+                   a->vna_hash = bfd_elf_hash (a->vna_nodename);
                    indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr,
                                               a->vna_nodename, true, false);
                    if (indx == (bfd_size_type) -1)