* elflink.c (elf_link_add_object_symbols): Don't assume version
indices are consecutive.
This commit is contained in:
parent
f4a6705cf8
commit
b23e50e23e
2 changed files with 17 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2004-11-15 Paul Brook <paul@codesourcery.com>
|
||||||
|
|
||||||
|
* elflink.c (elf_link_add_object_symbols): Don't assume version
|
||||||
|
indices are consecutive.
|
||||||
|
|
||||||
2004-11-14 Richard Sandiford <rsandifo@redhat.com>
|
2004-11-14 Richard Sandiford <rsandifo@redhat.com>
|
||||||
|
|
||||||
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
|
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
|
||||||
|
|
|
@ -3518,20 +3518,23 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
|
||||||
|
|
||||||
if (isym->st_shndx != SHN_UNDEF)
|
if (isym->st_shndx != SHN_UNDEF)
|
||||||
{
|
{
|
||||||
if (vernum > elf_tdata (abfd)->dynverdef_hdr.sh_info)
|
if (vernum > elf_tdata (abfd)->cverdefs)
|
||||||
{
|
verstr = NULL;
|
||||||
(*_bfd_error_handler)
|
|
||||||
(_("%B: %s: invalid version %u (max %d)"),
|
|
||||||
abfd, name, vernum,
|
|
||||||
elf_tdata (abfd)->dynverdef_hdr.sh_info);
|
|
||||||
bfd_set_error (bfd_error_bad_value);
|
|
||||||
goto error_free_vers;
|
|
||||||
}
|
|
||||||
else if (vernum > 1)
|
else if (vernum > 1)
|
||||||
verstr =
|
verstr =
|
||||||
elf_tdata (abfd)->verdef[vernum - 1].vd_nodename;
|
elf_tdata (abfd)->verdef[vernum - 1].vd_nodename;
|
||||||
else
|
else
|
||||||
verstr = "";
|
verstr = "";
|
||||||
|
|
||||||
|
if (verstr == NULL)
|
||||||
|
{
|
||||||
|
(*_bfd_error_handler)
|
||||||
|
(_("%B: %s: invalid version %u (max %d)"),
|
||||||
|
abfd, name, vernum,
|
||||||
|
elf_tdata (abfd)->cverdefs);
|
||||||
|
bfd_set_error (bfd_error_bad_value);
|
||||||
|
goto error_free_vers;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue