diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-07-10 14:20:20 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-07-10 14:27:39 -0700 |
commit | 889884731e09b46e4c2ecb051dfde1e2f69d2b47 (patch) | |
tree | a4e2caa2763562a127f970dad138ab6769b769be /binutils/ChangeLog | |
parent | a0e28e54675fd92e73df71fed5d4f6c718f40102 (diff) | |
download | binutils-gdb-889884731e09b46e4c2ecb051dfde1e2f69d2b47.tar.gz |
Properly convert objects between different ELF classes
The output SHF_COMPRESSED section size is different from input if
ELF classes of input and output aren't the same. We must adjust
the section sizes as well as the compression headers in
SHF_COMPRESSED sections when converting objects between different
ELF classes.
bfd/
PR binutils/18656
* bfd.c (bfd_convert_section_size): New function.
(bfd_convert_section_contents): Likewise.
* bfd-in2.h: Regenerated.
binutils/
2015-07-10 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/18656
* objcopy.c (setup_section): Call bfd_convert_section_size
to get the output section size.
(copy_section): Get the section size from the output section
and call bfd_get_full_section_contents to convert section
contents for output.
binutils/testsuite/
PR binutils/18656
* binutils-all/compress.exp (convert_test): New proc.
Run conversion tests between x86-64 and x32.
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 09b0e1c6f72..c504b33cb80 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,14 @@ 2015-07-10 H.J. Lu <hongjiu.lu@intel.com> + PR binutils/18656 + * objcopy.c (setup_section): Call bfd_convert_section_size + to get the output section size. + (copy_section): Get the section size from the output section + and call bfd_get_full_section_contents to convert section + contents for output. + +2015-07-10 H.J. Lu <hongjiu.lu@intel.com> + * readelf.c (dump_section_as_strings): Warn unsupported compress type and corrupted compressed section. (dump_section_as_bytes): Likewise. |