diff options
author | Alan Modra <amodra@gmail.com> | 2019-02-24 16:44:48 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-02-24 18:57:04 +1030 |
commit | f616c36b79d0776e51213b177e45a0f5d386cc58 (patch) | |
tree | 565d71b6f7fde2bacedacf2c8be9ddce7ce43b61 /bfd/pdp11.c | |
parent | 4323c5ad3cbcb2a3d2178d778278109f24071b26 (diff) | |
download | gdb-f616c36b79d0776e51213b177e45a0f5d386cc58.zip gdb-f616c36b79d0776e51213b177e45a0f5d386cc58.tar.gz gdb-f616c36b79d0776e51213b177e45a0f5d386cc58.tar.bz2 |
PR24144, pdp11-ld overwriting section data with zeros
bfd/
PR 24144
* pdp11.c (set_section_contents): Revert 2015-02-24 change.
gas/
PR 24144
* config/obj-aout.c (obj_aout_frob_file_before_fix): Write to end
of section to ensure file contents cover aligned section size.
Diffstat (limited to 'bfd/pdp11.c')
-rw-r--r-- | bfd/pdp11.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/bfd/pdp11.c b/bfd/pdp11.c index a46775a..b16c78f 100644 --- a/bfd/pdp11.c +++ b/bfd/pdp11.c @@ -1146,14 +1146,6 @@ NAME (aout, set_section_contents) (bfd *abfd, if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0 || bfd_bwrite (location, count, abfd) != count) return FALSE; - - /* If necessary, pad the section to its aligned size. */ - if ((section == obj_datasec (abfd) - || section == obj_textsec (abfd)) - && count < section->size - && (bfd_seek (abfd, section->filepos + offset + section->size - 1, SEEK_SET) != 0 - || bfd_bwrite ("", 1, abfd) != 1)) - return FALSE; } return TRUE; |