Serious ld issue on ppc64

Alan Modra amodra@bigpond.net.au
Fri Mar 26 15:56:00 GMT 2004


On Fri, Mar 26, 2004 at 11:37:39AM +1030, Alan Modra wrote:
> Yes.  I erred in not making these symbols STT_FUNC.  I'm testing an
> add_symbol_hook fudge to correct the type.

This cures Jakub's testcase, and survives "make check" in binutils
and glibc.

bfd/
	* 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.

ld/testsuite/
	* ld-powerpc/tlsexe.r: Update for changed sym type.
	* ld-powerpc/tlsexetoc.r: Likewise.

Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.145
diff -u -p -r1.145 elf64-ppc.c
--- bfd/elf64-ppc.c	25 Mar 2004 12:48:38 -0000	1.145
+++ bfd/elf64-ppc.c	26 Mar 2004 04:27:05 -0000
@@ -82,6 +82,7 @@ static bfd_reloc_status_type ppc64_elf_u
 #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
@@ -3471,6 +3472,22 @@ ppc64_elf_mark_entry_syms (struct bfd_li
       if (h != NULL)
 	((struct ppc_link_hash_entry *) h)->is_entry = 1;
     }
+  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;
 }
 
Index: bfd/elf-bfd.h
===================================================================
RCS file: /cvs/src/src/bfd/elf-bfd.h,v
retrieving revision 1.132
diff -u -p -r1.132 elf-bfd.h
--- bfd/elf-bfd.h	25 Mar 2004 12:48:31 -0000	1.132
+++ bfd/elf-bfd.h	26 Mar 2004 04:26:46 -0000
@@ -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: bfd/elflink.c
===================================================================
RCS file: /cvs/src/src/bfd/elflink.c,v
retrieving revision 1.61
diff -u -p -r1.61 elflink.c
--- bfd/elflink.c	26 Mar 2004 05:55:15 -0000	1.61
+++ bfd/elflink.c	26 Mar 2004 05:58:19 -0000
@@ -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: bfd/elf-hppa.h
===================================================================
RCS file: /cvs/src/src/bfd/elf-hppa.h,v
retrieving revision 1.70
diff -u -p -r1.70 elf-hppa.h
--- bfd/elf-hppa.h	20 Mar 2004 23:16:38 -0000	1.70
+++ bfd/elf-hppa.h	26 Mar 2004 04:26:47 -0000
@@ -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 
 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: bfd/elf32-frv.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-frv.c,v
retrieving revision 1.19
diff -u -p -r1.19 elf32-frv.c
--- bfd/elf32-frv.c	25 Mar 2004 12:48:32 -0000	1.19
+++ bfd/elf32-frv.c	26 Mar 2004 04:26:47 -0000
@@ -52,7 +52,7 @@ static bfd_boolean elf32_frv_relocate_se
   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: bfd/elf32-i370.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-i370.c,v
retrieving revision 1.34
diff -u -p -r1.34 elf32-i370.c
--- bfd/elf32-i370.c	25 Mar 2004 12:48:33 -0000	1.34
+++ bfd/elf32-i370.c	26 Mar 2004 04:26:47 -0000
@@ -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: bfd/elf32-m32r.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-m32r.c,v
retrieving revision 1.42
diff -u -p -r1.42 elf32-m32r.c
--- bfd/elf32-m32r.c	25 Mar 2004 12:48:34 -0000	1.42
+++ bfd/elf32-m32r.c	26 Mar 2004 04:26:50 -0000
@@ -51,7 +51,7 @@ bfd_boolean _bfd_m32r_elf_section_from_b
 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: bfd/elf32-m68hc1x.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-m68hc1x.c,v
retrieving revision 1.11
diff -u -p -r1.11 elf32-m68hc1x.c
--- bfd/elf32-m68hc1x.c	22 Mar 2004 02:28:16 -0000	1.11
+++ bfd/elf32-m68hc1x.c	26 Mar 2004 04:26:51 -0000
@@ -181,7 +181,7 @@ m68hc12_add_stub (const char *stub_name,
 
 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: bfd/elf32-m68hc1x.h
===================================================================
RCS file: /cvs/src/src/bfd/elf32-m68hc1x.h,v
retrieving revision 1.3
diff -u -p -r1.3 elf32-m68hc1x.h
--- bfd/elf32-m68hc1x.h	4 Oct 2003 21:02:53 -0000	1.3
+++ bfd/elf32-m68hc1x.h	26 Mar 2004 04:26:51 -0000
@@ -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_secti
 
 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: bfd/elf32-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-ppc.c,v
retrieving revision 1.115
diff -u -p -r1.115 elf32-ppc.c
--- bfd/elf32-ppc.c	25 Mar 2004 12:48:35 -0000	1.115
+++ bfd/elf32-ppc.c	26 Mar 2004 04:26:54 -0000
@@ -4376,7 +4376,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUT
 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: bfd/elf32-sh64.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-sh64.c,v
retrieving revision 1.22
diff -u -p -r1.22 elf32-sh64.c
--- bfd/elf32-sh64.c	8 Dec 2003 13:05:10 -0000	1.22
+++ bfd/elf32-sh64.c	26 Mar 2004 04:26:54 -0000
@@ -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_S
 
 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: bfd/elf32-v850.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-v850.c,v
retrieving revision 1.41
diff -u -p -r1.41 elf32-v850.c
--- bfd/elf32-v850.c	22 Mar 2004 02:28:16 -0000	1.41
+++ bfd/elf32-v850.c	26 Mar 2004 04:26:56 -0000
@@ -73,7 +73,7 @@ static bfd_boolean v850_elf_section_from
 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: bfd/elf64-alpha.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-alpha.c,v
retrieving revision 1.115
diff -u -p -r1.115 elf64-alpha.c
--- bfd/elf64-alpha.c	25 Mar 2004 12:48:38 -0000	1.115
+++ bfd/elf64-alpha.c	26 Mar 2004 04:26:59 -0000
@@ -123,7 +123,7 @@ static bfd_boolean elf64_alpha_size_rela
 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: bfd/elf64-mmix.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-mmix.c,v
retrieving revision 1.31
diff -u -p -r1.31 elf64-mmix.c
--- bfd/elf64-mmix.c	22 Mar 2004 02:28:17 -0000	1.31
+++ bfd/elf64-mmix.c	26 Mar 2004 04:27:01 -0000
@@ -205,7 +205,7 @@ static bfd_boolean mmix_elf_section_from
   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: bfd/elf64-sh64.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-sh64.c,v
retrieving revision 1.44
diff -u -p -r1.44 elf64-sh64.c
--- bfd/elf64-sh64.c	25 Mar 2004 12:48:41 -0000	1.44
+++ bfd/elf64-sh64.c	26 Mar 2004 04:27:07 -0000
@@ -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
 
 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: bfd/elf64-sparc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-sparc.c,v
retrieving revision 1.84
diff -u -p -r1.84 elf64-sparc.c
--- bfd/elf64-sparc.c	25 Mar 2004 12:48:41 -0000	1.84
+++ bfd/elf64-sparc.c	26 Mar 2004 04:27:09 -0000
@@ -61,7 +61,7 @@ static bfd_boolean sparc64_elf_size_dyna
 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: bfd/elfxx-ia64.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-ia64.c,v
retrieving revision 1.122
diff -u -p -r1.122 elfxx-ia64.c
--- bfd/elfxx-ia64.c	25 Mar 2004 12:48:42 -0000	1.122
+++ bfd/elfxx-ia64.c	26 Mar 2004 04:27:18 -0000
@@ -192,7 +192,7 @@ static bfd_boolean elfNN_ia64_fake_secti
 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: bfd/elfxx-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-mips.c,v
retrieving revision 1.94
diff -u -p -r1.94 elfxx-mips.c
--- bfd/elfxx-mips.c	25 Mar 2004 12:48:42 -0000	1.94
+++ bfd/elfxx-mips.c	26 Mar 2004 04:27:23 -0000
@@ -4715,7 +4715,7 @@ _bfd_mips_elf_section_from_bfd_section (
 
 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: bfd/elfxx-mips.h
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-mips.h,v
retrieving revision 1.18
diff -u -p -r1.18 elfxx-mips.h
--- bfd/elfxx-mips.h	9 Feb 2004 08:04:00 -0000	1.18
+++ bfd/elfxx-mips.h	26 Mar 2004 04:27:23 -0000
@@ -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_se
 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 *,
Index: ld/testsuite/ld-powerpc/tlsexe.r
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlsexe.r,v
retrieving revision 1.5
diff -u -p -r1.5 tlsexe.r
--- ld/testsuite/ld-powerpc/tlsexe.r	25 Jul 2003 01:39:42 -0000	1.5
+++ ld/testsuite/ld-powerpc/tlsexe.r	26 Mar 2004 04:27:42 -0000
@@ -69,7 +69,7 @@ Symbol table '\.dynsym' contains 10 entr
  +0: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND 
  +1: 0+100104c0 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
  +2: 0+ +0 TLS +GLOBAL DEFAULT +UND gd
- +3: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
+ +3: 0+ +0 FUNC +GLOBAL DEFAULT +UND __tls_get_addr
  +4: 0+ +0 FUNC +GLOBAL DEFAULT +UND \.__tls_get_addr
  +5: 0+ +0 TLS +GLOBAL DEFAULT +UND ld
  +6: 0+50 +0 TLS +GLOBAL DEFAULT +11 ld2
@@ -109,7 +109,7 @@ Symbol table '\.symtab' contains 43 entr
  +27: 0+100104c0 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
  +28: 0+ +0 TLS +GLOBAL DEFAULT +UND gd
  +29: 0+60 +0 TLS +GLOBAL DEFAULT +11 le0
- +30: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
+ +30: 0+ +0 FUNC +GLOBAL DEFAULT +UND __tls_get_addr
  +31: 0+ +0 FUNC +GLOBAL DEFAULT +UND \.__tls_get_addr
  +32: 0+40 +0 TLS +GLOBAL DEFAULT +11 ld0
  +33: 0+68 +0 TLS +GLOBAL DEFAULT +11 le1
Index: ld/testsuite/ld-powerpc/tlsexetoc.r
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-powerpc/tlsexetoc.r,v
retrieving revision 1.5
diff -u -p -r1.5 tlsexetoc.r
--- ld/testsuite/ld-powerpc/tlsexetoc.r	25 Jul 2003 01:39:42 -0000	1.5
+++ ld/testsuite/ld-powerpc/tlsexetoc.r	26 Mar 2004 04:27:42 -0000
@@ -68,7 +68,7 @@ Symbol table '\.dynsym' contains 9 entri
  +0: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND 
  +1: 0+10010448 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
  +2: 0+ +0 TLS +GLOBAL DEFAULT +UND gd
- +3: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
+ +3: 0+ +0 FUNC +GLOBAL DEFAULT +UND __tls_get_addr
  +4: 0+ +0 FUNC +GLOBAL DEFAULT +UND \.__tls_get_addr
  +5: 0+ +0 TLS +GLOBAL DEFAULT +UND ld
  +6: 0+100105f0 +0 NOTYPE +GLOBAL DEFAULT +ABS __bss_start
@@ -108,7 +108,7 @@ Symbol table '\.symtab' contains 44 entr
  +28: 0+10010448 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC
  +29: 0+ +0 TLS +GLOBAL DEFAULT +UND gd
  +30: 0+60 +0 TLS +GLOBAL DEFAULT +11 le0
- +31: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND __tls_get_addr
+ +31: 0+ +0 FUNC +GLOBAL DEFAULT +UND __tls_get_addr
  +32: 0+ +0 FUNC +GLOBAL DEFAULT +UND \.__tls_get_addr
  +33: 0+40 +0 TLS +GLOBAL DEFAULT +11 ld0
  +34: 0+68 +0 TLS +GLOBAL DEFAULT +11 le1

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list