aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2024-10-04 21:52:53 +0930
committerAlan Modra <amodra@gmail.com>2024-10-04 22:07:22 +0930
commit06116013f80e474800cfb122924bc2a6f060606a (patch)
tree423bc832146f61ef8f9147580fdedfb33123ed80
parent6e40f9bb31be2f3656df97a1fcba4d6a30081e24 (diff)
downloadgdb-06116013f80e474800cfb122924bc2a6f060606a.zip
gdb-06116013f80e474800cfb122924bc2a6f060606a.tar.gz
gdb-06116013f80e474800cfb122924bc2a6f060606a.tar.bz2
dlltool fixes for commit 68bbe1183379
For some reason, dlltool supports mcore-elf input files. * dlltool.c (filter_symbols): Drop symbols with NULL names. (identify_member_contains_symname): Don't consider symbols with NULL names.
-rw-r--r--binutils/dlltool.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
index 9acd080..d6821ca 100644
--- a/binutils/dlltool.c
+++ b/binutils/dlltool.c
@@ -1539,7 +1539,7 @@ filter_symbols (bfd *abfd, void *minisyms, long symcount, unsigned int size)
|| bfd_is_com_section (sym->section))
&& ! bfd_is_und_section (sym->section));
- keep = keep && ! match_exclude (sym->name);
+ keep = keep && sym->name != NULL && !match_exclude (sym->name);
if (keep)
{
@@ -3197,9 +3197,10 @@ identify_member_contains_symname (bfd * abfd,
for (i = 0; i < number_of_symbols; i++)
{
- if (strncmp (symbol_table[i]->name,
- search_data->symname,
- strlen (search_data->symname)) == 0)
+ if (symbol_table[i]->name != NULL
+ && strncmp (symbol_table[i]->name,
+ search_data->symname,
+ strlen (search_data->symname)) == 0)
{
search_data->found = true;
break;