mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 06:17:47 +08:00
PR23141, SIGSEGV in bfd_elf_set_group_contents
Another fuzzing fix. I think it's reasonable to simply strip out any group section that is too weird for objcopy to handle. PR 23141 * objcopy.c (is_strip_section): Strip groups without a valid signature symbol.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2018-05-08 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR 23141
|
||||||
|
* objcopy.c (is_strip_section): Strip groups without a valid
|
||||||
|
signature symbol.
|
||||||
|
|
||||||
2018-05-07 Alan Modra <amodra@gmail.com>
|
2018-05-07 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR 23142
|
PR 23142
|
||||||
|
@ -1343,14 +1343,15 @@ is_strip_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec)
|
|||||||
const char *gname;
|
const char *gname;
|
||||||
asection *elt, *first;
|
asection *elt, *first;
|
||||||
|
|
||||||
|
gsym = group_signature (sec);
|
||||||
|
/* Strip groups without a valid signature. */
|
||||||
|
if (gsym == NULL)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
/* PR binutils/3181
|
/* PR binutils/3181
|
||||||
If we are going to strip the group signature symbol, then
|
If we are going to strip the group signature symbol, then
|
||||||
strip the group section too. */
|
strip the group section too. */
|
||||||
gsym = group_signature (sec);
|
gname = gsym->name;
|
||||||
if (gsym != NULL)
|
|
||||||
gname = gsym->name;
|
|
||||||
else
|
|
||||||
gname = sec->name;
|
|
||||||
if ((strip_symbols == STRIP_ALL
|
if ((strip_symbols == STRIP_ALL
|
||||||
&& !is_specified_symbol (gname, keep_specific_htab))
|
&& !is_specified_symbol (gname, keep_specific_htab))
|
||||||
|| is_specified_symbol (gname, strip_specific_htab))
|
|| is_specified_symbol (gname, strip_specific_htab))
|
||||||
|
Reference in New Issue
Block a user