mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
PR 9841
* elf32-avr.c: Handle case where no local symbos exist correctly.
This commit is contained in:
parent
c087fcd326
commit
121230679f
@ -1,3 +1,8 @@
|
||||
2009-02-18 Bjoern Haase <bjoern.m.haase@web.de>
|
||||
|
||||
PR 9841
|
||||
* elf32-avr.c: Handle case where no local symbos exist correctly.
|
||||
|
||||
2009-02-16 Christophe Lyon <christophe.lyon@st.com>
|
||||
|
||||
bfd/
|
||||
|
@ -1415,7 +1415,6 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
|
||||
Elf_Internal_Rela *irelalign;
|
||||
Elf_Internal_Sym *isym;
|
||||
Elf_Internal_Sym *isymbuf = NULL;
|
||||
Elf_Internal_Sym *isymend;
|
||||
bfd_vma toaddr;
|
||||
struct elf_link_hash_entry **sym_hashes;
|
||||
struct elf_link_hash_entry **end_hashes;
|
||||
@ -1553,13 +1552,19 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
|
||||
|
||||
/* Adjust the local symbols defined in this section. */
|
||||
isym = (Elf_Internal_Sym *) symtab_hdr->contents;
|
||||
isymend = isym + symtab_hdr->sh_info;
|
||||
for (; isym < isymend; isym++)
|
||||
/* Fix PR 9841, there may be no local symbols. */
|
||||
if (isym != NULL)
|
||||
{
|
||||
if (isym->st_shndx == sec_shndx
|
||||
&& isym->st_value > addr
|
||||
&& isym->st_value < toaddr)
|
||||
isym->st_value -= count;
|
||||
Elf_Internal_Sym *isymend;
|
||||
|
||||
isymend = isym + symtab_hdr->sh_info;
|
||||
for (; isym < isymend; isym++)
|
||||
{
|
||||
if (isym->st_shndx == sec_shndx
|
||||
&& isym->st_value > addr
|
||||
&& isym->st_value < toaddr)
|
||||
isym->st_value -= count;
|
||||
}
|
||||
}
|
||||
|
||||
/* Now adjust the global symbols defined in this section. */
|
||||
|
Loading…
Reference in New Issue
Block a user