diff options
author | Nick Clifton <nickc@redhat.com> | 2008-06-04 09:59:08 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2008-06-04 09:59:08 +0000 |
commit | 081e66ab5209aee414e25a22ac7c6139a8ecae35 (patch) | |
tree | 1a07084734deb644f8fcda5e12e97108e044d4b9 | |
parent | 6e6e6fa89486a3d820fdc07b1c6b1d86683f6f43 (diff) | |
download | binutils-redhat-081e66ab5209aee414e25a22ac7c6139a8ecae35.tar.gz |
PR ld/6019
* elf32-avr.c (elf32_avr_relax_section): Handle the case where
there are no local symbols.
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf32-avr.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ce9a20c9be..8b315a338b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2008-06-04 Nick Clifton <nickc@redhat.com> + + PR ld/6019 + * elf32-avr.c (elf32_avr_relax_section): Handle the case where + there are no local symbols. + 2008-06-04 Alan Modra <amodra@bigpond.net.au> * elf32-spu.c (get_sym_h): Don't attempt to read global syms. diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c index 3cbfb75e41..ee2afab8f2 100644 --- a/bfd/elf32-avr.c +++ b/bfd/elf32-avr.c @@ -2034,7 +2034,8 @@ elf32_avr_relax_section (bfd *abfd, /* Check for local symbols. */ isym = (Elf_Internal_Sym *) symtab_hdr->contents; isymend = isym + symtab_hdr->sh_info; - for (; isym < isymend; isym++) + /* PR 6019: There may not be any local symbols. */ + for (; isym != NULL && isym < isymend; isym++) { if (isym->st_value == section_offset_of_ret_insn && isym->st_shndx == sec_shndx) |