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.
This commit is contained in:
parent
091021faaa
commit
b3862264bc
2 changed files with 6 additions and 2 deletions
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue