+#if defined (COFF_GO32_EXE) || defined (COFF_GO32)
+
+static void
+coff_set_alignment_hook (bfd * abfd, asection * section, void * scnhdr)
+{
+ struct internal_scnhdr *hdr = (struct internal_scnhdr *) scnhdr;
+
+ /* Check for extended relocs. */
+ if (hdr->s_flags & IMAGE_SCN_LNK_NRELOC_OVFL)
+ {
+ struct external_reloc dst;
+ struct internal_reloc n;
+ const file_ptr oldpos = bfd_tell (abfd);
+ const bfd_size_type relsz = bfd_coff_relsz (abfd);
+
+ if (bfd_seek (abfd, (file_ptr) hdr->s_relptr, 0) != 0)
+ return;
+ if (bfd_bread (& dst, relsz, abfd) != relsz)
+ return;
+
+ coff_swap_reloc_in (abfd, &dst, &n);
+ if (bfd_seek (abfd, oldpos, 0) != 0)
+ return;
+ section->reloc_count = hdr->s_nreloc = n.r_vaddr - 1;
+ section->rel_filepos += relsz;
+ }
+ else if (hdr->s_nreloc == 0xffff)
+ _bfd_error_handler
+ (_("%pB: warning: claims to have 0xffff relocs, without overflow"),
+ abfd);
+}
+
+#else /* ! COFF_GO32_EXE && ! COFF_GO32 */