* bucomm.c (list_supported_targets): Use bfd_target_list.
[deliverable/binutils-gdb.git] / bfd / cofflink.c
index 32200a83a63502c6122e0826aa59d46a061e5f4a..c1302ee878a28d0dc9dfbe6845ee04c47815a1c1 100644 (file)
@@ -757,6 +757,10 @@ _bfd_coff_final_link (abfd, info)
          o->flags |= SEC_RELOC;
          o->rel_filepos = rel_filepos;
          rel_filepos += o->reloc_count * relsz;
+         /* In PE COFF, if there are at least 0xffff relocations an
+            extra relocation will be written out to encode the count.  */
+         if (obj_pe (abfd) && o->reloc_count >= 0xffff)
+           rel_filepos += relsz;
        }
 
       if (bfd_coff_long_section_names (abfd)
@@ -1318,6 +1322,9 @@ mark_relocs (finfo, input_bfd)
 
       if ((a->flags & SEC_RELOC) == 0 || a->reloc_count  < 1)
        continue;
+      /* Don't mark relocs in excluded sections.  */
+      if (a->output_section == bfd_abs_section_ptr)
+       continue;
 
       /* Read in the relocs.  */
       internal_relocs = _bfd_coff_read_internal_relocs
This page took 0.023786 seconds and 4 git commands to generate.