forked from Imagelibrary/binutils-gdb
x86: Guard against corrupted PLT
There should be only one entry in PLT for a given symbol. Set howto to NULL after processing a PLT entry to guard against corrupted PLT so that the duplicated PLT entries are skipped. PR binutils/22170 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against corrupted PLT.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR binutils/22170
|
||||
* elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
|
||||
corrupted PLT.
|
||||
|
||||
2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR binutils/22163
|
||||
|
||||
@@ -1962,6 +1962,10 @@ _bfd_x86_elf_get_synthetic_symtab (bfd *abfd,
|
||||
names += sizeof ("@plt");
|
||||
n++;
|
||||
s++;
|
||||
/* There should be only one entry in PLT for a given
|
||||
symbol. Set howto to NULL after processing a PLT
|
||||
entry to guard against corrupted PLT. */
|
||||
p->howto = NULL;
|
||||
}
|
||||
offset += plt_entry_size;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user