diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-02-06 23:24:20 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-02-06 23:24:20 +0000 |
commit | 23244cd6e008ff68c41e8a9291b3df0bf76a8843 (patch) | |
tree | 63be7ea78ada1652d666b70f221e9e275c851dbb /ld/ldmain.c | |
parent | 59474174039062373caaee75dbcce0e6a5760968 (diff) | |
download | gdb-23244cd6e008ff68c41e8a9291b3df0bf76a8843.zip gdb-23244cd6e008ff68c41e8a9291b3df0bf76a8843.tar.gz gdb-23244cd6e008ff68c41e8a9291b3df0bf76a8843.tar.bz2 |
* ldmain.c (undefined_symbol): Handle section being NULL.
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r-- | ld/ldmain.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c index a9b836a..091f776 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -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; } |