aboutsummaryrefslogtreecommitdiff
path: root/bfd/ChangeLog
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-10-05 22:17:00 +0930
committerAlan Modra <amodra@gmail.com>2018-10-08 20:26:08 +1030
commit00bee008e9f7d0b3adf3278962450944653787f8 (patch)
tree880a8f4d14409add15b6d0ea01faaf491caefae2 /bfd/ChangeLog
parentc258c396faa626a4c7929a5ec97ee9b294073c5e (diff)
downloadbinutils-00bee008e9f7d0b3adf3278962450944653787f8.zip
binutils-00bee008e9f7d0b3adf3278962450944653787f8.tar.gz
binutils-00bee008e9f7d0b3adf3278962450944653787f8.tar.bz2
Tidy elf_segment_map allocation
This cleans up elf_segment_map allocation when the section array is empty. "amt += (to - from - 1) * sizeof (asection *)", when "to" and "from" are unsigned int results in an unsigned value inside the parentheses. When "to" and "from" are equal on a 64-bit host, 0xffffffff * 8 is added to "amt", not -8 as desired. The patch also renames a variable for consistency with other functions using a similar index. * elf.c (make_mapping): Cope with zero size array at end of struct elf_segment_map. (_bfd_elf_map_sections_to_segments): Likewise. (rewrite_elf_program_header, copy_elf_program_header): Likewise. (_bfd_elf_map_sections_to_segments): Rename phdr_index to hdr_index.
Diffstat (limited to 'bfd/ChangeLog')
-rw-r--r--bfd/ChangeLog8
1 files changed, 8 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index da2a4d2..4e5eac1 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,11 @@
+2018-10-08 Alan Modra <amodra@gmail.com>
+
+ * elf.c (make_mapping): Cope with zero size array at end of
+ struct elf_segment_map.
+ (_bfd_elf_map_sections_to_segments): Likewise.
+ (rewrite_elf_program_header, copy_elf_program_header): Likewise.
+ (_bfd_elf_map_sections_to_segments): Rename phdr_index to hdr_index.
+
2018-10-05 Alan Modra <amodra@gmail.com>
* elf32-spu.c (spu_elf_create_sections): Make .note.spu_name