diff options
author | Ian Lance Taylor <ian@airs.com> | 2003-08-12 16:46:17 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2003-08-12 16:46:17 +0000 |
commit | 0b28295df7c39f648b27ade721c92a6e18c068ba (patch) | |
tree | 23c7ba50311b128033d7b3989433ab152fa63c08 /ld | |
parent | 49ed40de4ec7230bed1eca033992ce57be7b69f9 (diff) | |
download | fsf-binutils-gdb-0b28295df7c39f648b27ade721c92a6e18c068ba.zip fsf-binutils-gdb-0b28295df7c39f648b27ade721c92a6e18c068ba.tar.gz fsf-binutils-gdb-0b28295df7c39f648b27ade721c92a6e18c068ba.tar.bz2 |
* ldmain.c (undefined_symbol): Change parameter name from `fatal'
to `error'. If only a warning, put warning in the reported
string. Consistently set failure flag when not a warning.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 6 | ||||
-rw-r--r-- | ld/ldmain.c | 46 |
2 files changed, 39 insertions, 13 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 3c520af..5a9f404 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2003-08-12 Ian Lance Taylor <ian@airs.com> + + * ldmain.c (undefined_symbol): Change parameter name from `fatal' + to `error'. If only a warning, put warning in the reported + string. Consistently set failure flag when not a warning. + 2003-08-08 Dmitry Diky <diwil@mail.ru> * Makefile.am: Add xW42 and xE42 parts. Sort MPU list according to diff --git a/ld/ldmain.c b/ld/ldmain.c index 3647217..048ebba 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -1268,7 +1268,7 @@ undefined_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED, bfd *abfd, asection *section, bfd_vma address, - bfd_boolean fatal ATTRIBUTE_UNUSED) + bfd_boolean error) { static char *error_name; static unsigned int error_count; @@ -1311,27 +1311,47 @@ undefined_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED, { if (error_count < MAX_ERRORS_IN_A_ROW) { - einfo (_("%C: undefined reference to `%T'\n"), - abfd, section, address, name); - if (fatal) - einfo ("%X"); + if (error) + einfo (_("%X%C: undefined reference to `%T'\n"), + abfd, section, address, name); + else + einfo (_("%C: warning: 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 (error) + einfo (_("%X%D: more undefined references to `%T' follow\n"), + abfd, section, address, name); + else + einfo (_("%D: warning: more undefined references to `%T' follow\n"), + abfd, section, address, name); + } + else if (error) + einfo ("%X"); } else { if (error_count < MAX_ERRORS_IN_A_ROW) { - einfo (_("%B: undefined reference to `%T'\n"), - abfd, name); - if (fatal) - einfo ("%X"); + if (error) + einfo (_("%X%B: undefined reference to `%T'\n"), + abfd, name); + else + einfo (_("%B: warning: 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); + { + if (error) + einfo (_("%X%B: more undefined references to `%T' follow\n"), + abfd, name); + else + einfo (_("%B: warning: more undefined references to `%T' follow\n"), + abfd, name); + } + else if (error) + einfo ("%X"); } return TRUE; |