]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* elf64-ppc.c (elf_backend_add_symbol_hook): Define.
authorAlan Modra <amodra@gmail.com>
Fri, 26 Mar 2004 06:13:40 +0000 (06:13 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 26 Mar 2004 06:13:40 +0000 (06:13 +0000)
(ppc64_elf_add_symbol_hook): New function.
* elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
const from Elf_Internal_Sym param.
* elflink.c (elf_link_add_object_symbols): Adjust.
* elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
* elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
* elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
* elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
* elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
* elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
* elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
* elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
* elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
* elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
* elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
* elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
* elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
* elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
* elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
* elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.

20 files changed:
bfd/ChangeLog
bfd/elf-bfd.h
bfd/elf-hppa.h
bfd/elf32-frv.c
bfd/elf32-i370.c
bfd/elf32-m32r.c
bfd/elf32-m68hc1x.c
bfd/elf32-m68hc1x.h
bfd/elf32-ppc.c
bfd/elf32-sh64.c
bfd/elf32-v850.c
bfd/elf64-alpha.c
bfd/elf64-mmix.c
bfd/elf64-ppc.c
bfd/elf64-sh64.c
bfd/elf64-sparc.c
bfd/elflink.c
bfd/elfxx-ia64.c
bfd/elfxx-mips.c
bfd/elfxx-mips.h

index 3ccef11600961d790648b9adb8608e3bd822ce58..0b8b69cb016431939f63295ea4cbd6f8eb053df1 100644 (file)
@@ -1,3 +1,27 @@
+2004-03-26  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
+       (ppc64_elf_add_symbol_hook): New function.
+       * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
+       const from Elf_Internal_Sym param.
+       * elflink.c (elf_link_add_object_symbols): Adjust.
+       * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
+       * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
+       * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
+       * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
+       * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
+       * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
+       * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
+       * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
+       * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
+       * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
+       * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
+       * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
+       * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
+       * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
+       * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
+       * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
+
 2004-03-26  Alan Modra  <amodra@bigpond.net.au>
 
        * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
index 6b7730ae4a6531059bb873718513446e0428aafb..484a4923e155bebb4d5a9c158f55fa6e08af0cb2 100644 (file)
@@ -625,7 +625,7 @@ struct elf_backend_data
      indices, and must set at least *FLAGS and *SEC for each processor
      dependent case; failure to do so will cause a link error.  */
   bfd_boolean (*elf_add_symbol_hook)
-    (bfd *abfd, struct bfd_link_info *info, const Elf_Internal_Sym *,
+    (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *,
      const char **name, flagword *flags, asection **sec, bfd_vma *value);
 
   /* If this field is not NULL, it is called by the elf_link_output_sym
index f5aba51e55f78f51164b601b604d405ac5b3e07c..534dd11453a3686b6b7c043eba9df0ee9a676e79 100644 (file)
@@ -1,5 +1,6 @@
 /* Common code for PA ELF implementations.
-   Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 1999, 2000, 2001, 2002, 2003, 2004
+   Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
 
@@ -1070,7 +1071,7 @@ static bfd_boolean elf_hppa_sort_unwind (bfd *abfd)
 static bfd_boolean
 elf_hppa_add_symbol_hook (bfd *abfd,
                          struct bfd_link_info *info ATTRIBUTE_UNUSED,
-                         const Elf_Internal_Sym *sym,
+                         Elf_Internal_Sym *sym,
                          const char **namep ATTRIBUTE_UNUSED,
                          flagword *flagsp ATTRIBUTE_UNUSED,
                          asection **secp,
index 46a5ea4f7cd37367614478066b168fc102fdd276..039b4a3b479770afaa801e1d29d053e5caea5b87 100644 (file)
@@ -52,7 +52,7 @@ static bfd_boolean elf32_frv_relocate_section
   PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
           Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
 static bfd_boolean elf32_frv_add_symbol_hook
-  PARAMS (( bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
+  PARAMS (( bfd *, struct bfd_link_info *, Elf_Internal_Sym *,
            const char **, flagword *, asection **, bfd_vma *));
 static bfd_reloc_status_type frv_final_link_relocate
   PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *,
@@ -2584,7 +2584,7 @@ static bfd_boolean
 elf32_frv_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
      bfd *abfd;
      struct bfd_link_info *info;
-     const Elf_Internal_Sym *sym;
+     Elf_Internal_Sym *sym;
      const char **namep ATTRIBUTE_UNUSED;
      flagword *flagsp ATTRIBUTE_UNUSED;
      asection **secp;
index dd84b2dc6f75e91d98c87c48c814d081bbf92fef..f78292500813973aec20e52bc8db1ab11851407d 100644 (file)
@@ -1548,7 +1548,7 @@ static int i370_noop ()
 
 #define elf_backend_add_symbol_hook \
   (bfd_boolean (*) \
-     PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *, \
+     PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Sym *, \
              const char **, flagword *, asection **, bfd_vma *))) i370_noop
 #define elf_backend_finish_dynamic_symbol \
   (bfd_boolean (*) \
index 605abcf83aad3f437242bf8b6ac73b5bf2364ce3..812b3ca0451a358ba24d8f5b7a28956d1d1d6563 100644 (file)
@@ -51,7 +51,7 @@ bfd_boolean _bfd_m32r_elf_section_from_bfd_section
 void _bfd_m32r_elf_symbol_processing
   PARAMS ((bfd *, asymbol *));
 static bfd_boolean m32r_elf_add_symbol_hook
-  PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
+  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Sym *,
           const char **, flagword *, asection **, bfd_vma *));
 static bfd_boolean m32r_elf_relocate_section
   PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
@@ -1391,7 +1391,7 @@ static bfd_boolean
 m32r_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
      bfd *abfd;
      struct bfd_link_info *info;
-     const Elf_Internal_Sym *sym;
+     Elf_Internal_Sym *sym;
      const char **namep;
      flagword *flagsp ATTRIBUTE_UNUSED;
      asection **secp;
index 00b75df0a7a488fd0e51e5b7921dbcfa78de75fc..9de2f8b20e613410876975a8d706b072d16ef5ed 100644 (file)
@@ -181,7 +181,7 @@ m68hc12_add_stub (const char *stub_name, asection *section,
 
 bfd_boolean
 elf32_m68hc11_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
-                               const Elf_Internal_Sym *sym,
+                               Elf_Internal_Sym *sym,
                                const char **namep ATTRIBUTE_UNUSED,
                                flagword *flagsp ATTRIBUTE_UNUSED,
                                asection **secp ATTRIBUTE_UNUSED,
index 59640232d803063fc37550408e948a5b01620957..f6b2001a33446429749efc2bc4605a6b524b1943 100644 (file)
@@ -1,5 +1,5 @@
 /* Motorola 68HC11/68HC12-specific support for 32-bit ELF
-   Copyright 2003 Free Software Foundation, Inc.
+   Copyright 2003, 2004 Free Software Foundation, Inc.
    Contributed by Stephane Carrez (stcarrez@nerim.fr)
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -178,7 +178,7 @@ bfd_boolean elf32_m68hc11_relocate_section
 
 bfd_boolean elf32_m68hc11_add_symbol_hook
   (bfd *abfd, struct bfd_link_info *info,
-   const Elf_Internal_Sym *sym, const char **namep,
+   Elf_Internal_Sym *sym, const char **namep,
    flagword *flagsp, asection **secp,
    bfd_vma *valp);
 
index 019545463d92978d79bc24366b3b3e9b7991f087..515a9296b8432c00cdaf95d09cfd1402f3db64c0 100644 (file)
@@ -4376,7 +4376,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED,
 static bfd_boolean
 ppc_elf_add_symbol_hook (bfd *abfd,
                         struct bfd_link_info *info,
-                        const Elf_Internal_Sym *sym,
+                        Elf_Internal_Sym *sym,
                         const char **namep ATTRIBUTE_UNUSED,
                         flagword *flagsp ATTRIBUTE_UNUSED,
                         asection **secp,
index eac444af4624cace2e5e884d11533296b5091b3a..f013e6fea8f1660197ecdefb135dc6f1e5566a99 100644 (file)
@@ -1,5 +1,5 @@
 /* SuperH SH64-specific support for 32-bit ELF
-   Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -56,7 +56,7 @@ static bfd_boolean shmedia_prepare_reloc
 static int sh64_elf_get_symbol_type
   (Elf_Internal_Sym *, int);
 static bfd_boolean sh64_elf_add_symbol_hook
-  (bfd *, struct bfd_link_info *, const Elf_Internal_Sym *, const char **,
+  (bfd *, struct bfd_link_info *, Elf_Internal_Sym *, const char **,
    flagword *, asection **, bfd_vma *);
 static bfd_boolean sh64_elf_link_output_symbol_hook
   (struct bfd_link_info *, const char *, Elf_Internal_Sym *, asection *,
@@ -374,7 +374,7 @@ sh64_elf_get_symbol_type (Elf_Internal_Sym *elf_sym, int type)
 
 static bfd_boolean
 sh64_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
-                         const Elf_Internal_Sym *sym, const char **namep,
+                         Elf_Internal_Sym *sym, const char **namep,
                          flagword *flagsp ATTRIBUTE_UNUSED,
                          asection **secp, bfd_vma *valp)
 {
index 747095213e735c1302887e44357491a45abf04a5..2aba9cd5a86136ab65c290513b120429f15258ae 100644 (file)
@@ -73,7 +73,7 @@ static bfd_boolean v850_elf_section_from_bfd_section
 static void v850_elf_symbol_processing
   PARAMS ((bfd *, asymbol *));
 static bfd_boolean v850_elf_add_symbol_hook
-  PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
+  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Sym *,
           const char **, flagword *, asection **, bfd_vma *));
 static bfd_boolean v850_elf_link_output_symbol_hook
   PARAMS ((struct bfd_link_info *, const char *, Elf_Internal_Sym *,
@@ -2124,7 +2124,7 @@ static bfd_boolean
 v850_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
      bfd *abfd;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
-     const Elf_Internal_Sym *sym;
+     Elf_Internal_Sym *sym;
      const char **namep ATTRIBUTE_UNUSED;
      flagword *flagsp ATTRIBUTE_UNUSED;
      asection **secp;
index c84dddf71c3d0497713c5d0911390b6b5b3dc2fe..1683683f775143bdd95fcd6a29aeb2b5c061f785 100644 (file)
@@ -123,7 +123,7 @@ static bfd_boolean elf64_alpha_size_rela_got_section
 static bfd_boolean elf64_alpha_size_rela_got_1
   PARAMS ((struct alpha_elf_link_hash_entry *, struct bfd_link_info *));
 static bfd_boolean elf64_alpha_add_symbol_hook
-  PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
+  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Sym *,
           const char **, flagword *, asection **, bfd_vma *));
 static struct alpha_elf_got_entry *get_got_entry
   PARAMS ((bfd *, struct alpha_elf_link_hash_entry *, unsigned long,
@@ -2363,7 +2363,7 @@ static bfd_boolean
 elf64_alpha_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
      bfd *abfd;
      struct bfd_link_info *info;
-     const Elf_Internal_Sym *sym;
+     Elf_Internal_Sym *sym;
      const char **namep ATTRIBUTE_UNUSED;
      flagword *flagsp ATTRIBUTE_UNUSED;
      asection **secp;
index 0e1da0650ecaf3837edc2b7d2f60fe57eadb2e01..7f34a83b679ec322557dffcca0acaca16ff55fa1 100644 (file)
@@ -205,7 +205,7 @@ static bfd_boolean mmix_elf_section_from_bfd_section
   PARAMS ((bfd *, asection *, int *));
 
 static bfd_boolean mmix_elf_add_symbol_hook
-  PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
+  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Sym *,
           const char **, flagword *, asection **, bfd_vma *));
 
 static bfd_boolean mmix_elf_is_local_label_name
@@ -2175,7 +2175,7 @@ bfd_boolean
 mmix_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
      bfd *abfd;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
-     const Elf_Internal_Sym *sym;
+     Elf_Internal_Sym *sym;
      const char **namep ATTRIBUTE_UNUSED;
      flagword *flagsp ATTRIBUTE_UNUSED;
      asection **secp;
index cf15f9297797cf6e7a3236f36d484f931ef38285..a2aebfea212dbd2804e82d503da4cec385664872 100644 (file)
@@ -82,6 +82,7 @@ static bfd_reloc_status_type ppc64_elf_unhandled_reloc
 #define elf_backend_grok_psinfo                      ppc64_elf_grok_psinfo
 #define elf_backend_create_dynamic_sections   ppc64_elf_create_dynamic_sections
 #define elf_backend_copy_indirect_symbol      ppc64_elf_copy_indirect_symbol
+#define elf_backend_add_symbol_hook          ppc64_elf_add_symbol_hook
 #define elf_backend_check_relocs             ppc64_elf_check_relocs
 #define elf_backend_gc_mark_hook             ppc64_elf_gc_mark_hook
 #define elf_backend_gc_sweep_hook            ppc64_elf_gc_sweep_hook
@@ -3474,6 +3475,22 @@ ppc64_elf_mark_entry_syms (struct bfd_link_info *info)
   return TRUE;
 }
 
+/* Hack symbols defined in .opd sections to be function type.  */
+
+static bfd_boolean
+ppc64_elf_add_symbol_hook (bfd *ibfd ATTRIBUTE_UNUSED,
+                          struct bfd_link_info *info ATTRIBUTE_UNUSED,
+                          Elf_Internal_Sym *isym,
+                          const char **name ATTRIBUTE_UNUSED,
+                          flagword *flags ATTRIBUTE_UNUSED,
+                          asection **sec,
+                          bfd_vma *value ATTRIBUTE_UNUSED)
+{
+  if (strcmp (bfd_get_section_name (ibfd, *sec), ".opd") == 0)
+    isym->st_info = ELF_ST_INFO (ELF_ST_BIND (isym->st_info), STT_FUNC);
+  return TRUE;
+}
+
 static bfd_boolean
 update_local_sym_info (bfd *abfd, Elf_Internal_Shdr *symtab_hdr,
                       unsigned long r_symndx, bfd_vma r_addend, int tls_type)
index 652a4f8ac4230a2cd055b921069bd0a5d512a30b..87b754e31bdc6eb0b1d182705534e8c206038af1 100644 (file)
@@ -141,7 +141,7 @@ static bfd_boolean sh_elf64_check_relocs
 static int sh64_elf64_get_symbol_type
   (Elf_Internal_Sym *, int);
 static bfd_boolean sh64_elf64_add_symbol_hook
-  (bfd *, struct bfd_link_info *, const Elf_Internal_Sym *, const char **,
+  (bfd *, struct bfd_link_info *, Elf_Internal_Sym *, const char **,
    flagword *, asection **, bfd_vma *);
 static bfd_boolean sh64_elf64_link_output_symbol_hook
   (struct bfd_link_info *, const char *, Elf_Internal_Sym *, asection *,
@@ -2887,7 +2887,7 @@ sh64_elf64_get_symbol_type (Elf_Internal_Sym * elf_sym, int type)
 
 static bfd_boolean
 sh64_elf64_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
-                           const Elf_Internal_Sym *sym, const char **namep,
+                           Elf_Internal_Sym *sym, const char **namep,
                            flagword *flagsp ATTRIBUTE_UNUSED,
                            asection **secp, bfd_vma *valp)
 {
index 219a434d8039adc0831dfb9d0bab881428ce756d..6c9d302564e6bf4a4365fc11b755a008a0110d29 100644 (file)
@@ -61,7 +61,7 @@ static bfd_boolean sparc64_elf_size_dynamic_sections
 static int sparc64_elf_get_symbol_type
   PARAMS (( Elf_Internal_Sym *, int));
 static bfd_boolean sparc64_elf_add_symbol_hook
-  PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
+  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Sym *,
           const char **, flagword *, asection **, bfd_vma *));
 static bfd_boolean sparc64_elf_output_arch_syms
   PARAMS ((bfd *, struct bfd_link_info *, PTR,
@@ -1385,7 +1385,7 @@ static bfd_boolean
 sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
      bfd *abfd;
      struct bfd_link_info *info;
-     const Elf_Internal_Sym *sym;
+     Elf_Internal_Sym *sym;
      const char **namep;
      flagword *flagsp ATTRIBUTE_UNUSED;
      asection **secp ATTRIBUTE_UNUSED;
index 61495fcc6da957e9934ce75ec243005b89c09256..a11e7cdea8d33b2f0f0c4dbf9968d30e33dfa9c6 100644 (file)
@@ -2848,7 +2848,7 @@ static bfd_boolean
 elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
 {
   bfd_boolean (*add_symbol_hook)
-    (bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
+    (bfd *, struct bfd_link_info *, Elf_Internal_Sym *,
      const char **, flagword *, asection **, bfd_vma *);
   bfd_boolean (*check_relocs)
     (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
index 27b5aa59f3ca980fd26dd05436456604452afd73..c1d6622006e79021c692a57fdf8bb235d4b391fe 100644 (file)
@@ -192,7 +192,7 @@ static bfd_boolean elfNN_ia64_fake_sections
 static void elfNN_ia64_final_write_processing
   PARAMS ((bfd *abfd, bfd_boolean linker));
 static bfd_boolean elfNN_ia64_add_symbol_hook
-  PARAMS ((bfd *abfd, struct bfd_link_info *info, const Elf_Internal_Sym *sym,
+  PARAMS ((bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym,
           const char **namep, flagword *flagsp, asection **secp,
           bfd_vma *valp));
 static int elfNN_ia64_additional_program_headers
@@ -1430,7 +1430,7 @@ static bfd_boolean
 elfNN_ia64_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
      bfd *abfd;
      struct bfd_link_info *info;
-     const Elf_Internal_Sym *sym;
+     Elf_Internal_Sym *sym;
      const char **namep ATTRIBUTE_UNUSED;
      flagword *flagsp ATTRIBUTE_UNUSED;
      asection **secp;
index b82e1093176b3d5c877cefd810ecc1ce8db325e4..12eb566941ff83ec56226dcd3932b852919314af 100644 (file)
@@ -4715,7 +4715,7 @@ _bfd_mips_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED,
 
 bfd_boolean
 _bfd_mips_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
-                              const Elf_Internal_Sym *sym, const char **namep,
+                              Elf_Internal_Sym *sym, const char **namep,
                               flagword *flagsp ATTRIBUTE_UNUSED,
                               asection **secp, bfd_vma *valp)
 {
index 9e5d7afe4279374a4cec034ae99d7d044377eec9..0a684d90867847c30c2a4ab981e960c77804984a 100644 (file)
@@ -1,5 +1,5 @@
 /* MIPS ELF specific backend routines.
-   Copyright 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
 
@@ -35,7 +35,7 @@ extern bfd_boolean _bfd_mips_elf_fake_sections
 extern bfd_boolean _bfd_mips_elf_section_from_bfd_section
   (bfd *, asection *, int *);
 extern bfd_boolean _bfd_mips_elf_add_symbol_hook
-  (bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
+  (bfd *, struct bfd_link_info *, Elf_Internal_Sym *,
    const char **, flagword *, asection **, bfd_vma *);
 extern bfd_boolean _bfd_mips_elf_link_output_symbol_hook
   (struct bfd_link_info *, const char *, Elf_Internal_Sym *,