From: Chen Gang Date: Wed, 18 Mar 2015 01:12:19 +0000 (+1030) Subject: Use %F instead of %X for einfo X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b3862264bc6009a993685ee5e9dd2879a503e36a;p=binutils-gdb.git Use %F instead of %X for einfo When src or dst is NULL, the next fread or fwrite will cause a segmentation fault, so we need to treat it as fatal. * ldmain.c (main): Use %F instead of %X for einfo. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 0f8fbc47c61..3760916eb99 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,7 @@ +2015-03-18 Chen Gang + + * ldmain.c (main): Use %F instead of %X for einfo. + 2015-03-02 Alan Modra * ld.texinfo (Options <-z nocopyreloc>): Rewrite. diff --git a/ld/ldmain.c b/ld/ldmain.c index 4b41288fe5c..6674a80c894 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -484,10 +484,10 @@ main (int argc, char **argv) dst = fopen (dst_name, FOPEN_WB); if (!src) - einfo (_("%X%P: unable to open for source of copy `%s'\n"), + einfo (_("%P%F: unable to open for source of copy `%s'\n"), output_filename); if (!dst) - einfo (_("%X%P: unable to open for destination of copy `%s'\n"), + einfo (_("%P%F: unable to open for destination of copy `%s'\n"), dst_name); while ((l = fread (buf, 1, bsize, src)) > 0) {