diff options
author | Alan Modra <amodra@gmail.com> | 2019-11-19 14:53:44 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-11-19 15:31:48 +1030 |
commit | dd68a12bc4b19c50c31fe357335bb8ee9a3322fc (patch) | |
tree | cb7ca99d9ebd27d86aa0fd0ac26eb022522da14b /binutils/ChangeLog | |
parent | f14080d440fab16dcb498c1a46864a5a1be37aaa (diff) | |
download | gdb-dd68a12bc4b19c50c31fe357335bb8ee9a3322fc.zip gdb-dd68a12bc4b19c50c31fe357335bb8ee9a3322fc.tar.gz gdb-dd68a12bc4b19c50c31fe357335bb8ee9a3322fc.tar.bz2 |
PR25191, internal error in _bfd_elf_set_section_contents
This PR copies a fuzzed PE input file to ELF output, in the process
confusing the ELF backend by copying COFF-only section flags to the
output. SEC_COFF_SHARED has the same value as SEC_ELF_COMPRESS. One
approach to fixing this problem is of course not to reuse flag bits,
but we've run out. So this patch only copies section flags that are
in the bfd_applicable_section_flags set when changing the flavour of
the output file.
PR 25191
* objcopy.c (is_nondebug_keep_contents_section): Use bfd_get_flavour.
(copy_object): Likewise.
(setup_section): Likewise. If flavour of input and output files
differ, restrict section flags to the intersection of input and
output bfd_applicable_section_flags.
Diffstat (limited to 'binutils/ChangeLog')
-rw-r--r-- | binutils/ChangeLog | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index bf6d20e..4fabf0c 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,14 @@ 2019-11-19 Alan Modra <amodra@gmail.com> + PR 25191 + * objcopy.c (is_nondebug_keep_contents_section): Use bfd_get_flavour. + (copy_object): Likewise. + (setup_section): Likewise. If flavour of input and output files + differ, restrict section flags to the intersection of input and + output bfd_applicable_section_flags. + +2019-11-19 Alan Modra <amodra@gmail.com> + * bucomm.c (bfd_nonfatal_message): Add a space between program name and file. |