diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/elf32-avr.c | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 5f840a1..272da0c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> + + PR ld/13402 + * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust + reloc addend if necessary. Adjust diff only if + shrinked_insn_address < end_address. + 2017-06-27 Alan Modra <amodra@gmail.com> PR binutils/21665 diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c index f140aa7..830da28 100644 --- a/bfd/elf32-avr.c +++ b/bfd/elf32-avr.c @@ -1785,12 +1785,15 @@ elf32_avr_adjust_diff_reloc_value (bfd *abfd, if (shrinked_insn_address >= start_address - && shrinked_insn_address <= end_address) + && shrinked_insn_address < end_address) { /* Reduce the diff value by count bytes and write it back into section contents. */ bfd_signed_vma new_diff = x < 0 ? x + count : x - count; + if (sym2_address > shrinked_insn_address) + irel->r_addend -= count; + switch (ELF32_R_TYPE (irel->r_info)) { case R_AVR_DIFF8: |