summaryrefslogtreecommitdiff
path: root/bfd/elf32-avr.c
diff options
context:
space:
mode:
authorEric B. Weddington <eric.weddington@atmel.com>2012-07-24 21:44:44 +0000
committerEric B. Weddington <eric.weddington@atmel.com>2012-07-24 21:44:44 +0000
commit8ad199463f5056a7ef3c2c4dc1f3c4c7126de5c6 (patch)
tree02d33426821d0c4d4cac6969fd466dbb1a126299 /bfd/elf32-avr.c
parentf1859405f7b7b4ee238a153ab83c249610c02085 (diff)
downloadbinutils-redhat-8ad199463f5056a7ef3c2c4dc1f3c4c7126de5c6.tar.gz
2012-07-24 Jan Waclawek <konfera@efton.sk>
PR 13899 * elf32-avr.c (elf32_avr_relax_delete_bytes): Call _bfd_elf_link_read_relocs with keep_memory as TRUE.
Diffstat (limited to 'bfd/elf32-avr.c')
-rw-r--r--bfd/elf32-avr.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index 38e41df48d..857a4b7f41 100644
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -1558,7 +1558,7 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
irel = elf_section_data (isec)->relocs;
/* PR 12161: Read in the relocs for this section if necessary. */
if (irel == NULL)
- irel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, FALSE);
+ irel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, TRUE);
for (irelend = irel + isec->reloc_count;
irel < irelend;
@@ -1617,9 +1617,6 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
/* else...Reference symbol is extern. No need for adjusting
the addend. */
}
-
- if (elf_section_data (isec)->relocs == NULL)
- free (irelend - isec->reloc_count);
}
}