Fix PR 20221 - adjust syms and relocs only if relax shrunk section.
authorDenis Chertykov <chertykov@gmail.com>
Thu, 9 Jun 2016 16:17:43 +0000 (19:17 +0300)
committerDenis Chertykov <chertykov@gmail.com>
Thu, 9 Jun 2016 16:17:43 +0000 (19:17 +0300)
commit5c41dbc302c2dd87e201e4fd1d9ae3186f6e51a0
treef97034bca2d7f3fa8d45fc6b6931d9117a6de79e
parent1857fe72aff6f254217956d141bff4b9ca454bc5
Fix PR 20221 - adjust syms and relocs only if relax shrunk section.

This patch fixes an edge case in linker relaxation that causes symbol
values to be computed incorrectly in the presence of align directives
in input source code.

bfd/
* elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust syms
and relocs only if shrinking occurred.

ld/
* testsuite/ld-avr/avr-prop-5.d: New.
* testsuite/ld-avr/avr-prop-5.s: New.
bfd/ChangeLog
bfd/elf32-avr.c
ld/ChangeLog
ld/testsuite/ld-avr/avr-prop-5.d [new file with mode: 0644]
ld/testsuite/ld-avr/avr-prop-5.s [new file with mode: 0644]