Don't use the output section size to copy input section
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 29 Sep 2015 16:35:47 +0000 (09:35 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 29 Sep 2015 20:31:57 +0000 (13:31 -0700)
commitcbd44e247ede49688e1e1fa42e57d390ad141967
tree7296da5e95dea5f24228fc3499a8ffc84c861b3e
parent0bcf3dd6905d67936815411b42dab6fd4c47b4db
Don't use the output section size to copy input section

We can't use the output section size to copy input section since
--interleave will shrink the output section.  Instead, we change
bfd_convert_section_contents to return the updated input section
size.  When we do that, we don't need to adjust the output section
size to skip gap fills.

bfd/

PR binutils/19020
* bfd.c (bfd_convert_section_contents): Add ptr_size parameter.
* bfd-in2.h: Regenerated.

binutils/

PR binutils/19020
* objcopy.c (copy_object): Don't adjust the output section size
when copying from input sections.
(copy_section): Use input section size for the copy.  Get the
updated section size from bfd_convert_section_contents.

binutils/testsuite/

PR binutils/19020
* binutils-all/objcopy.exp: Run pr19020a and pr19020b.
* lib/utils-lib.exp (run_dump_test): Support binary input.
* binutils-all/pr19020.in: New file.
* binutils-all/pr19020a.d: Likewise.
* binutils-all/pr19020b.d: Likewise.
bfd/ChangeLog
bfd/bfd-in2.h
bfd/bfd.c
binutils/ChangeLog
binutils/objcopy.c
binutils/testsuite/ChangeLog
binutils/testsuite/binutils-all/objcopy.exp
binutils/testsuite/binutils-all/pr19020.in [new file with mode: 0644]
binutils/testsuite/binutils-all/pr19020a.d [new file with mode: 0644]
binutils/testsuite/binutils-all/pr19020b.d [new file with mode: 0644]
binutils/testsuite/lib/utils-lib.exp
This page took 0.026279 seconds and 4 git commands to generate.