diff options
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 6 | ||||
-rw-r--r-- | binutils/nm.c | 3 | ||||
-rw-r--r-- | binutils/objcopy.c | 3 |
3 files changed, 10 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 0d5e4a0..192de3c 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2021-10-19 Nick Clifton <nickc@redhat.com> + + * nm.c (filter_symbols): Test for a NULL name before checking to + see if the symbol is __gnu_lto_slim. + * objcopy.c (filter_symbols): Likewise. + 2021-09-30 Nick Clifton <nickc@redhat.com> * objcopy.c (filter_symbols): Fail if attempting to dredefine diff --git a/binutils/nm.c b/binutils/nm.c index 82ccec6..7606956 100644 --- a/binutils/nm.c +++ b/binutils/nm.c @@ -544,7 +544,8 @@ filter_symbols (bfd *abfd, bool is_dynamic, void *minisyms, if (sym == NULL) bfd_fatal (bfd_get_filename (abfd)); - if (sym->name[0] == '_' + if (sym->name != NULL + && sym->name[0] == '_' && sym->name[1] == '_' && strcmp (sym->name + (sym->name[2] == '_'), "__gnu_lto_slim") == 0 && report_plugin_err) diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 75fd89d..0e7400f 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -1542,7 +1542,8 @@ filter_symbols (bfd *abfd, bfd *obfd, asymbol **osyms, { char *new_name; - if (name[0] == '_' + if (name != NULL + && name[0] == '_' && name[1] == '_' && strcmp (name + (name[2] == '_'), "__gnu_lto_slim") == 0) { |