aboutsummaryrefslogtreecommitdiff
path: root/bfd/ChangeLog
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-02-20 21:53:44 +1030
committerAlan Modra <amodra@gmail.com>2020-02-21 10:47:05 +1030
commitdda2980f54a0c9437de047f3020f520dd1e0de6a (patch)
tree0cec5fd8cca1430f9ebf92c851d58dab01c39ba0 /bfd/ChangeLog
parent6565bf67add96edbe99c24acb312fe84079ab6a0 (diff)
downloadgdb-dda2980f54a0c9437de047f3020f520dd1e0de6a.zip
gdb-dda2980f54a0c9437de047f3020f520dd1e0de6a.tar.gz
gdb-dda2980f54a0c9437de047f3020f520dd1e0de6a.tar.bz2
PR25569, PDP11 ld -s clobbers last data byte
This patch fixes an ancient wart in aout support, in that text and data section sizes are rounded up for alignment rather that just the corresponding header sizes. Changing section sizes could conceivably result in buffer overflows if section contents were held in memory. Also, keeping the original section sizes allows this PR to be fixed nicely. bfd/ PR 25569 * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic): Use "text", "data" and "bss" section pointer vars. Don't update section size, just exec header sizes. (adjust_sizes_and_vmas): Don't update text section size. Set initial exec header a_text. Print exec headers sizes. * pdp11.c (adjust_o_magic, adjust_z_magic, adjust_n_magic), (adjust_sizes_and_vmas): Similarly. Formatting. (final_link): Correct final file extension. gas/ PR 25569 * config/obj-aout.c (obj_aout_frob_file_before_fix): Don't loop on section size adjustment, instead perform another write if exec header size is larger than section size.
Diffstat (limited to 'bfd/ChangeLog')
-rw-r--r--bfd/ChangeLog12
1 files changed, 12 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6ee734c..0f9c3e5 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,15 @@
+2020-02-21 Alan Modra <amodra@gmail.com>
+
+ PR 25569
+ * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic): Use
+ "text", "data" and "bss" section pointer vars. Don't update
+ section size, just exec header sizes.
+ (adjust_sizes_and_vmas): Don't update text section size. Set
+ initial exec header a_text. Print exec headers sizes.
+ * pdp11.c (adjust_o_magic, adjust_z_magic, adjust_n_magic),
+ (adjust_sizes_and_vmas): Similarly. Formatting.
+ (final_link): Correct final file extension.
+
2020-02-20 Nick Clifton <nickc@redhat.com>
* elf-bfd.h (struct elf_backend_data): Add symbol_section_index