Use %F instead of %X for einfo
authorChen Gang <gang.chen.5i5j@gmail.com>
Wed, 18 Mar 2015 01:12:19 +0000 (11:42 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 18 Mar 2015 01:15:12 +0000 (11:45 +1030)
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.

ld/ChangeLog
ld/ldmain.c

index 0f8fbc47c610389d10635b690d5823d945186fba..3760916eb9985506ef9ba0b9074f8cc5f19d9fc4 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-18  Chen Gang  <gang.chen.5i5j@gmail.com>
+
+       * ldmain.c (main): Use %F instead of %X for einfo.
+
 2015-03-02  Alan Modra  <amodra@gmail.com>
 
        * ld.texinfo (Options <-z nocopyreloc>): Rewrite.
index 4b41288fe5c57a51539d48a4de94ae40ff5cdb0b..6674a80c89432a052ea5a7ff434007b207c2c183 100644 (file)
@@ -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)
                {
This page took 0.026149 seconds and 4 git commands to generate.