aboutsummaryrefslogtreecommitdiff
path: root/bfd/peigen.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2000-10-06 19:47:51 +0000
committerDJ Delorie <dj@redhat.com>2000-10-06 19:47:51 +0000
commit3e4554a2064c06f1b49a759095ad5f2d172d45bc (patch)
tree8b7e2125fe2e18d4ea4815db4306b516b1a40158 /bfd/peigen.c
parentfb27a91c6ce3ad4153ab103d2dfbb54b704922a2 (diff)
downloadgdb-3e4554a2064c06f1b49a759095ad5f2d172d45bc.zip
gdb-3e4554a2064c06f1b49a759095ad5f2d172d45bc.tar.gz
gdb-3e4554a2064c06f1b49a759095ad5f2d172d45bc.tar.bz2
* peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
* coffcode.h (coff_set_alignment_hook): read extended reloc count (coff_write_relocs): write extended reloc count (coff_write_object_contents): account for extended relocs
Diffstat (limited to 'bfd/peigen.c')
-rw-r--r--bfd/peigen.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/bfd/peigen.c b/bfd/peigen.c
index 066a601..a3373fc 100644
--- a/bfd/peigen.c
+++ b/bfd/peigen.c
@@ -991,12 +991,19 @@ _bfd_pei_swap_scnhdr_out (abfd, in, out)
(bfd_byte *) scnhdr_ext->s_nreloc);
else
{
- (*_bfd_error_handler) (_("%s: reloc overflow: 0x%lx > 0xffff"),
+ /* PE can deal with large #s of relocs, but not here */
+ bfd_h_put_16 (abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nreloc);
+ scnhdr_int->s_flags |= IMAGE_SCN_LNK_NRELOC_OVFL;
+ bfd_h_put_32(abfd, scnhdr_int->s_flags,
+ (bfd_byte *) scnhdr_ext->s_flags);
+#if 0
+ (*_bfd_error_handler) (_("%s: reloc overflow 1: 0x%lx > 0xffff"),
bfd_get_filename (abfd),
scnhdr_int->s_nreloc);
bfd_set_error (bfd_error_file_truncated);
bfd_h_put_16 (abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nreloc);
ret = 0;
+#endif
}
}
return ret;