aboutsummaryrefslogtreecommitdiff
path: root/gas/config/obj-coffbfd.c
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1994-01-07 17:42:34 +0000
committerSteve Chamberlain <sac@cygnus>1994-01-07 17:42:34 +0000
commit03a372ed70ea5a518c98b6bc005162b014b2801d (patch)
tree8b91ccce18dd485fff92e2d934422423ecfe66aa /gas/config/obj-coffbfd.c
parent90d58284c10aed0025a993ab5a1c14994a44f447 (diff)
downloadgdb-03a372ed70ea5a518c98b6bc005162b014b2801d.zip
gdb-03a372ed70ea5a518c98b6bc005162b014b2801d.tar.gz
gdb-03a372ed70ea5a518c98b6bc005162b014b2801d.tar.bz2
* config/obj-coffbfd.c (fill_section): Don't ever fill past the
end of a section. (write_object_file): Temporary fix - setup stdoutput.
Diffstat (limited to 'gas/config/obj-coffbfd.c')
-rw-r--r--gas/config/obj-coffbfd.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gas/config/obj-coffbfd.c b/gas/config/obj-coffbfd.c
index 3a93f36..2e42c14 100644
--- a/gas/config/obj-coffbfd.c
+++ b/gas/config/obj-coffbfd.c
@@ -565,7 +565,7 @@ DEFUN (fill_section, (abfd, h, file_cursor),
unsigned int off = frag->fr_fix;
for (count = frag->fr_offset; count; count--)
{
- if (fill_size < s->s_size)
+ if (fill_size + frag->fr_address + off < s->s_size)
{
memcpy (buffer + frag->fr_address + off,
frag->fr_literal + frag->fr_fix,
@@ -1932,10 +1932,19 @@ DEFUN_VOID (write_object_file)
}
coff_header_append (abfd, &headers);
-
+#if 0
+ /* Recent changes to write need this, but where it should
+ go is up to Ken.. */
if (bfd_close_all_done (abfd) == false)
as_fatal ("Can't close %s: %s", out_file_name,
bfd_errmsg (bfd_error));
+#else
+ {
+ extern bfd *stdoutput;
+ stdoutput = abfd;
+ }
+#endif
+
}
/* Add a new segment. This is called from subseg_new via the