mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-04 15:54:25 +08:00
* elflink.c (elf_link_add_object_symbols): Don't assume version
indices are consecutive.
This commit is contained in:
parent
f4a6705cf8
commit
b23e50e23e
@ -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>
|
||||
|
||||
* 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 (vernum > elf_tdata (abfd)->dynverdef_hdr.sh_info)
|
||||
{
|
||||
(*_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;
|
||||
}
|
||||
if (vernum > elf_tdata (abfd)->cverdefs)
|
||||
verstr = NULL;
|
||||
else if (vernum > 1)
|
||||
verstr =
|
||||
elf_tdata (abfd)->verdef[vernum - 1].vd_nodename;
|
||||
else
|
||||
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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user