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]

bfd trivia


A warning fix, and regen a few files.  Looks like configure wasn't
updated when the last lot of freebsd changes went in.

	* elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
	unsigned.  Move "symcount" assignment out of loop.
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* po/SRC-POTFILES.in: Regnerate.

Index: bfd/elfcode.h
===================================================================
RCS file: /cvs/src/src/bfd/elfcode.h,v
retrieving revision 1.35
diff -u -p -r1.35 elfcode.h
--- bfd/elfcode.h	18 Sep 2002 13:25:35 -0000	1.35
+++ bfd/elfcode.h	21 Sep 2002 09:25:30 -0000
@@ -1377,7 +1377,7 @@ elf_slurp_reloc_table_from_section (abfd
   arelent *relent;
   unsigned int i;
   int entsize;
-  long symcount;
+  unsigned int symcount;
 
   allocated = (PTR) bfd_malloc (rel_hdr->sh_size);
   if (allocated == NULL)
@@ -1394,6 +1394,11 @@ elf_slurp_reloc_table_from_section (abfd
   BFD_ASSERT (entsize == sizeof (Elf_External_Rel)
 	      || entsize == sizeof (Elf_External_Rela));
 
+  if (dynamic)
+    symcount = bfd_get_dynamic_symcount (abfd);
+  else
+    symcount = bfd_get_symcount (abfd);
+
   for (i = 0, relent = relents;
        i < reloc_count;
        i++, relent++, native_relocs += entsize)
@@ -1419,11 +1424,6 @@ elf_slurp_reloc_table_from_section (abfd
 	relent->address = rela.r_offset;
       else
 	relent->address = rela.r_offset - asect->vma;
-
-      if (dynamic)
-	symcount = bfd_get_dynamic_symcount (abfd);
-      else
-	symcount = bfd_get_symcount (abfd);
 
       if (ELF_R_SYM (rela.r_info) == 0)
 	relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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