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 | 696b7ad299612b5d98829141508f5a844e2a5049 (patch) | |
tree | cca63eb29767979fae4fbbe7e97243f3bc01b413 /bfd/elf32-avr.c | |
parent | 0fe58ccd2b957a1034c2488d63659c30ca505e77 (diff) | |
download | gdb-696b7ad299612b5d98829141508f5a844e2a5049.zip gdb-696b7ad299612b5d98829141508f5a844e2a5049.tar.gz gdb-696b7ad299612b5d98829141508f5a844e2a5049.tar.bz2 |
PR ld/6019
* elf32-avr.c (elf32_avr_relax_section): Handle the case where
there are no local symbols.
Diffstat (limited to 'bfd/elf32-avr.c')
-rw-r--r-- | bfd/elf32-avr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c index 3cbfb75..ee2afab 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) |