* ldmain.c (undefined_symbol): Handle section being NULL.

This commit is contained in:
Ian Lance Taylor 1995-02-06 23:24:20 +00:00
parent 5947417403
commit 23244cd6e0
2 changed files with 20 additions and 6 deletions

View File

@ -1,5 +1,7 @@
Mon Feb 6 12:17:24 1995 Ian Lance Taylor <ian@cygnus.com>
* ldmain.c (undefined_symbol): Handle section being NULL.
* ldctor.c (ldctor_build_sets): Handle bfd_link_hash_defweak.
* ldexp.c (fold_name): Likewise.
* ldlang.c (print_one_symbol): Likewise.

View File

@ -833,12 +833,24 @@ undefined_symbol (info, name, abfd, section, address)
error_name = buystring (name);
}
if (error_count < MAX_ERRORS_IN_A_ROW)
einfo ("%X%C: undefined reference to `%T'\n",
abfd, section, address, name);
else if (error_count == MAX_ERRORS_IN_A_ROW)
einfo ("%D: more undefined references to `%T' follow\n",
abfd, section, address, name);
if (section != NULL)
{
if (error_count < MAX_ERRORS_IN_A_ROW)
einfo ("%X%C: undefined reference to `%T'\n",
abfd, section, address, name);
else if (error_count == MAX_ERRORS_IN_A_ROW)
einfo ("%D: more undefined references to `%T' follow\n",
abfd, section, address, name);
}
else
{
if (error_count < MAX_ERRORS_IN_A_ROW)
einfo ("%X%B: undefined reference to `%T'\n",
abfd, name);
else if (error_count == MAX_ERRORS_IN_A_ROW)
einfo ("%B: more undefined references to `%T' follow\n",
abfd, name);
}
return true;
}