This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Other problems with binutils sh64-elf


On Feb 10, 2002, Daniel Jacobowitz <dmj+@andrew.cmu.edu> wrote:

> you also introduced a lot of warnings:

> Would you mind cleaning those up, on trunk and branch?

I went ahead and cleaned up some in gas, in addition to those in bfd.
Ok to install?

Index: bfd/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* elf32-sh.c: Added missing prototypes.
	* elf32-sh64.c: Likewise.
	(sh_elf_align_loads): Mark unused args as such.
	* elf64-sh64.: Added missing prototypes.
	(struct elf_sh64_link_hash_entry): Fix typo.
	(sh_elf64_relocate_section): Fix info argument passed to
	_bfd_elf_section_offset.

Index: bfd/elf32-sh64.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-sh64.c,v
retrieving revision 1.1
diff -u -p -r1.1 elf32-sh64.c
--- bfd/elf32-sh64.c 2002/02/08 05:33:21 1.1
+++ bfd/elf32-sh64.c 2002/02/11 05:44:14
@@ -58,6 +58,7 @@ static boolean sh64_backend_section_from
 static void sh64_elf_final_write_processing PARAMS ((bfd *, boolean));
 static boolean sh64_bfd_elf_copy_private_section_data
   PARAMS ((bfd *, asection *, bfd *, asection *));
+static void sh64_find_section_for_address PARAMS ((bfd *, asection *, PTR));
 
 /* Let elf32-sh.c handle the "bfd_" definitions, so we only have to
    intrude with an #ifndef around the function definition.  */
Index: bfd/elf32-sh.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-sh.c,v
retrieving revision 1.42.2.1
diff -u -p -r1.42.2.1 elf32-sh.c
--- bfd/elf32-sh.c 2002/02/10 22:16:35 1.42.2.1
+++ bfd/elf32-sh.c 2002/02/11 05:44:17
@@ -85,6 +85,9 @@ static boolean sh_elf_gc_sweep_hook
 	   const Elf_Internal_Rela *));
 static enum elf_reloc_type_class sh_elf_reloc_type_class
   PARAMS ((const Elf_Internal_Rela *));
+#ifdef INCLUDE_SHMEDIA
+inline static void movi_shori_putval PARAMS ((bfd *, unsigned long, char *));
+#endif
 
 /* The name of the dynamic interpreter.  This is put in the .interp
    section.  */
@@ -2808,10 +2811,10 @@ sh_elf_relax_delete_bytes (abfd, sec, ad
 
 static boolean
 sh_elf_align_loads (abfd, sec, internal_relocs, contents, pswapped)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      asection *sec;
      Elf_Internal_Rela *internal_relocs;
-     bfd_byte *contents;
+     bfd_byte *contents ATTRIBUTE_UNUSED;
      boolean *pswapped;
 {
   Elf_Internal_Rela *irel, *irelend;
Index: bfd/elf64-sh64.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-sh64.c,v
retrieving revision 1.1
diff -u -p -r1.1 elf64-sh64.c
--- bfd/elf64-sh64.c 2002/02/08 05:33:21 1.1
+++ bfd/elf64-sh64.c 2002/02/11 05:44:19
@@ -84,7 +84,7 @@ struct elf_sh64_link_hash_entry
   bfd_vma datalabel_got_offset;
 
   /* Number of PC relative relocs copied for this symbol.  */
-  struct elf_sh_pcrel_relocs_copied *pcrel_relocs_copied;
+  struct elf_sh64_pcrel_relocs_copied *pcrel_relocs_copied;
 };
 
 /* sh ELF linker hash table.  */
@@ -145,6 +145,25 @@ extern boolean sh64_elf64_link_output_sy
 static boolean sh64_elf64_fake_sections
   PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
 static void sh64_elf64_final_write_processing PARAMS ((bfd *, boolean));
+static struct bfd_hash_entry *sh64_elf64_link_hash_newfunc
+  PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+static struct bfd_link_hash_table *sh64_elf64_link_hash_table_create
+  PARAMS ((bfd *));
+inline static void movi_shori_putval PARAMS ((bfd *, unsigned long, char *));
+inline static void movi_3shori_putval PARAMS ((bfd *, bfd_vma, char *));
+static boolean sh64_elf64_create_dynamic_sections
+  PARAMS ((bfd *, struct bfd_link_info *));
+static boolean sh64_elf64_adjust_dynamic_symbol
+  PARAMS ((struct bfd_link_info *info, struct elf_link_hash_entry *));
+static boolean sh64_elf64_discard_copies
+  PARAMS ((struct elf_sh64_link_hash_entry *, PTR));
+static boolean sh64_elf64_size_dynamic_sections
+  PARAMS ((bfd *, struct bfd_link_info *));
+static boolean sh64_elf64_finish_dynamic_symbol
+  PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
+	   Elf_Internal_Sym *));
+static boolean sh64_elf64_finish_dynamic_sections
+  PARAMS ((bfd *, struct bfd_link_info *));
 
 static reloc_howto_type sh_elf64_howto_table[] = {
   /* No relocation.  */
@@ -1729,10 +1748,8 @@ sh_elf64_relocate_section (output_bfd, i
 	      skip = false;
 
 	      outrel.r_offset
-		= _bfd_elf_section_offset (output_bfd,
-					   &elf_hash_table (info)->stab_info,
-					   input_section,
-					   rel->r_offset);
+		= _bfd_elf_section_offset (output_bfd, info,
+					   input_section, rel->r_offset);
 
 	      if (outrel.r_offset == (bfd_vma) -1)
 		skip = true;

Index: gas/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* config/tc-sh.c (dot): Removed unused function.

Index: gas/config/tc-sh.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-sh.c,v
retrieving revision 1.57
diff -u -p -r1.57 tc-sh.c
--- gas/config/tc-sh.c 2002/02/08 06:32:20 1.57
+++ gas/config/tc-sh.c 2002/02/11 05:41:33
@@ -59,7 +59,6 @@ static unsigned int assemble_ppi PARAMS 
 static void little PARAMS ((int));
 static void big PARAMS ((int));
 static int parse_reg PARAMS ((char *, int *, int *));
-static symbolS *dot PARAMS ((void));
 static char *parse_exp PARAMS ((char *, sh_operand_info *));
 static char *parse_at PARAMS ((char *, sh_operand_info *));
 static void get_operand PARAMS ((char **, sh_operand_info *));
@@ -1256,20 +1255,6 @@ parse_reg (src, mode, reg)
     }
 
   return 0;
-}
-
-static symbolS *
-dot ()
-{
-  const char *fake;
-
-  /* JF: '.' is pseudo symbol with value of current location
-     in current segment.  */
-  fake = FAKE_LABEL_NAME;
-  return  symbol_new (fake,
-		      now_seg,
-		      (valueT) frag_now_fix (),
-		      frag_now);
 }
 
 static char *


-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]