aboutsummaryrefslogtreecommitdiff
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
commit6aa82b649b1352d7c6c0132f2ba631f5e7bde6f3 (patch)
tree8c77fdadfc8c868506861977f8241e08a08376dd /bfd/elf32-avr.c
parent9b8d1a36034b5bdf665b952f581d96a987faecdf (diff)
downloadgdb-6aa82b649b1352d7c6c0132f2ba631f5e7bde6f3.zip
gdb-6aa82b649b1352d7c6c0132f2ba631f5e7bde6f3.tar.gz
gdb-6aa82b649b1352d7c6c0132f2ba631f5e7bde6f3.tar.bz2
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 38e41df..857a4b7 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);
}
}