* aoutx.h (aout_link_input_section): Don't bother to read or write
authorIan Lance Taylor <ian@airs.com>
Wed, 26 Oct 1994 05:17:08 +0000 (05:17 +0000)
committerIan Lance Taylor <ian@airs.com>
Wed, 26 Oct 1994 05:17:08 +0000 (05:17 +0000)
the relocs if there aren't any.

bfd/ChangeLog
bfd/aoutx.h

index cd47d04e978f82111d7b07cf8c4990fe6159f49a..2c1e06689b2ef58bc8ecd4e84ab382cdcb12256c 100644 (file)
@@ -1,5 +1,23 @@
+Wed Oct 26 01:15:51 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * aoutx.h (aout_link_input_section): Don't bother to read or write
+       the relocs if there aren't any.
+
 Tue Oct 25 11:44:38 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
 
+       * Makefile.in (ALL_MACHINES): Add tekhex.o.
+       * targets.c (bfd_target_vector): If SELECT_VECS is not defined,
+       include tekhex_vec.
+       * tekhex.c (NIBBLE, ISHEX): Cast array arguments to unsigned char.
+       (getvalue, getsym, out): Likewise.
+       (find_chunk): Remove unused variable s.
+       (first_phase): Remove unused variable s.
+       (pass_over): Remove unused variable address.
+       (tekhex_object_p): Remove unused variable section.
+       (move_section_contents): Change return type from boolean to void.
+       (tekhex_write_object_contents): Remove unused variables tdata and
+       list.
+
        * linker.c (enum link_action): Add CIND.
        (link_action): Change COMMON_ROW\indr from MDEF to CREF.  Change
        INDR_ROW\common from MDEF to CIND.
index 2923c802ad40d42bb5958a15037c0867b6fca5e5..c0d934e924a353457485d5fe97dc53f17dbcd294 100644 (file)
@@ -4092,9 +4092,12 @@ aout_link_input_section (finfo, input_bfd, input_section, reloff_ptr,
   else
     {
       relocs = finfo->relocs;
-      if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0
-         || bfd_read (relocs, 1, rel_size, input_bfd) != rel_size)
-       return false;
+      if (rel_size > 0)
+       {
+         if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0
+             || bfd_read (relocs, 1, rel_size, input_bfd) != rel_size)
+           return false;
+       }
     }
 
   /* Relocate the section contents.  */
@@ -4123,7 +4126,7 @@ aout_link_input_section (finfo, input_bfd, input_section, reloff_ptr,
 
   /* If we are producing relocateable output, the relocs were
      modified, and we now write them out.  */
-  if (finfo->info->relocateable)
+  if (finfo->info->relocateable && rel_size > 0)
     {
       if (bfd_seek (finfo->output_bfd, *reloff_ptr, SEEK_SET) != 0)
        return false;
This page took 0.035703 seconds and 4 git commands to generate.