]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Adjust the output section size to skip gap fills
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 29 Sep 2015 13:33:03 +0000 (06:33 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 29 Sep 2015 13:33:24 +0000 (06:33 -0700)
commitc68c16371639f360d1b110eacf4b1a28ddb5cf53
treebf509df0af5ca85cd1b7930fb905b81a0e96949f
parent7ecc513a44095d614f10e89c67d9be5826abacf9
Adjust the output section size to skip gap fills

In objcopy, copy_object calls copy_section to copy contents of input
section to output section.  When --gap-fill= is used, objcopy extends
the size of output sectios to fill gaps between output sections with
gap fills.  In this case, we adjust the output section size to skip
gap files to avoid reading beypond the input section buffer before
calling copy_section and restore the output section size after input
sections have been copied.

binutils/

PR binutils/19005
* objcopy.c (copy_object): Adjust the output section size to
skip gap fills between sections when copying from input sections
to output sections.

ld/testsuite/

PR binutils/19005
* ld-elf/pr19005.d: New file.
* ld-elf/pr19005.s: Likewise.
* ld-elf/pr19005.t: Likewise.
binutils/ChangeLog
binutils/objcopy.c
ld/testsuite/ChangeLog
ld/testsuite/ld-elf/pr19005.d [new file with mode: 0644]
ld/testsuite/ld-elf/pr19005.s [new file with mode: 0644]
ld/testsuite/ld-elf/pr19005.t [new file with mode: 0644]