summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepesh Varatharajan <Deepesh.Varatharajan@windriver.com>2025-04-29 05:54:56 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-05-01 14:22:53 +0100
commit0ee82d77402dc63cacb17f2a88a59ff190ddf8bb (patch)
tree0e0d2dc6b210abaf8a86abac86a3e8068843db20
parent83d0d473d6d5a8d59875b0af581d27267e804ba9 (diff)
downloadpoky-0ee82d77402dc63cacb17f2a88a59ff190ddf8bb.tar.gz
binutils: stable 2.44 branch updates
Below commits on binutils-2.44 stable branch are updated. fe459e33c67 PR 32603, revert message changes in 0b7f992b78fe and 31e9e2e8d109 37d12dd25d8 gdb/compile: add missing entry in bfd_link_callbacks array 31e9e2e8d10 PR 32603, more ld -w misbehaviour 0b7f992b78f PR 32603, ld -w misbehaviour 8cb98edf123 s390: Add support for z17 as CPU name ed70d86b491 x86: Remove AVX10.2 256 bit rounding support e1af7e590a5 elf: Clear the SEC_ALLOC bit for NOLOAD note sections 35db8c6dd2f ld: Pass -Wl,-z,lazy to compiler for i386 lazy binding tests cc7ec316a45 Updated translations for bfd and gold bf088ee09a7 PR 32731 ub sanitizer accessing filenames_reversed 78082591ec7 score-elf gas SEGV d4c7ee9fbc1 gas: fix rs_fill_nop listing a68d096a0ab Open the 2.44 branch for further development Dropped: 0015-CVE-2025-1153.patch Testing was done and there were no regressions found (From OE-Core rev: 749bdd5bda6f9b5af8d63794858bbb9834294fcb) Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.44.inc3
-rw-r--r--meta/recipes-devtools/binutils/binutils/0015-CVE-2025-1153.patch3355
2 files changed, 1 insertions, 3357 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.44.inc b/meta/recipes-devtools/binutils/binutils-2.44.inc
index 1aafbd5285..4680248f83 100644
--- a/meta/recipes-devtools/binutils/binutils-2.44.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.44.inc
@@ -20,7 +20,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
20 20
21CVE_STATUS[CVE-2023-25584] = "cpe-incorrect: Applies only for version 2.40 and earlier" 21CVE_STATUS[CVE-2023-25584] = "cpe-incorrect: Applies only for version 2.40 and earlier"
22 22
23SRCREV ?= "815d9a14cbbb3b81843f7566222c87fb22e7255d" 23SRCREV ?= "96bc9e8081a5dbe8329c1d5b0c94191fd5bed840"
24BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${SRCBRANCH};protocol=https" 24BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${SRCBRANCH};protocol=https"
25SRC_URI = "\ 25SRC_URI = "\
26 ${BINUTILS_GIT_URI} \ 26 ${BINUTILS_GIT_URI} \
@@ -35,6 +35,5 @@ SRC_URI = "\
35 file://0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \ 35 file://0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
36 file://0013-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \ 36 file://0013-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \
37 file://0014-Remove-duplicate-pe-dll.o-entry-deom-targ_extra_ofil.patch \ 37 file://0014-Remove-duplicate-pe-dll.o-entry-deom-targ_extra_ofil.patch \
38 file://0015-CVE-2025-1153.patch \
39" 38"
40S = "${WORKDIR}/git" 39S = "${WORKDIR}/git"
diff --git a/meta/recipes-devtools/binutils/binutils/0015-CVE-2025-1153.patch b/meta/recipes-devtools/binutils/binutils/0015-CVE-2025-1153.patch
deleted file mode 100644
index e75df08fd4..0000000000
--- a/meta/recipes-devtools/binutils/binutils/0015-CVE-2025-1153.patch
+++ /dev/null
@@ -1,3355 +0,0 @@
1From 8d97c1a53f3dc9fd8e1ccdb039b8a33d50133150 Mon Sep 17 00:00:00 2001
2From: Alan Modra <amodra@gmail.com>
3Date: Thu, 6 Feb 2025 21:46:22 +1030
4Subject: [PATCH] PR 32603, ld -w misbehaviour
5
6ld -w currently causes segmentation faults and other misbehaviour
7since it changes einfo with %F in the format string (fatal error) to
8not exit. This patch fixes that by introducing a new variant of einfo
9called "fatal" that always exits, and replaces all einfo calls using
10%F with a call to fatal without the %F. I considered modifying einfo
11to inspect the first 2 or 4 chars in the format string, looking for
12%F, but decided that was probably a bad idea given that translators
13might have moved the %F. It's also a little nicer to inform the
14compiler of a function that doesn't return.
15
16The patch also fixes some formatting nits, and makes use of %pA
17to print section names in a couple of places in aix.em.
18
19CVE: CVE-2025-1153
20Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8d97c1a53f3dc9fd8e1ccdb039b8a33d50133150]
21Signed-off-by: Peter Marko <peter.marko@siemens.com>
22---
23 ld/emulparams/call_nop.sh | 6 +-
24 ld/emulparams/cet.sh | 2 +-
25 ld/emulparams/elf32mcore.sh | 2 +-
26 ld/emulparams/x86-64-lam.sh | 6 +-
27 ld/emulparams/x86-64-level-report.sh | 2 +-
28 ld/emulparams/x86-64-level.sh | 2 +-
29 ld/emultempl/aarch64elf.em | 6 +-
30 ld/emultempl/aix.em | 41 +++++----
31 ld/emultempl/armelf.em | 10 +--
32 ld/emultempl/avrelf.em | 2 +-
33 ld/emultempl/beos.em | 24 ++---
34 ld/emultempl/cr16elf.em | 4 +-
35 ld/emultempl/cskyelf.em | 4 +-
36 ld/emultempl/elf.em | 16 ++--
37 ld/emultempl/hppaelf.em | 4 +-
38 ld/emultempl/kvxelf.em | 7 +-
39 ld/emultempl/loongarchelf.em | 4 +-
40 ld/emultempl/m68hc1xelf.em | 2 +-
41 ld/emultempl/m68kelf.em | 4 +-
42 ld/emultempl/metagelf.em | 4 +-
43 ld/emultempl/mipself.em | 2 +-
44 ld/emultempl/mmix-elfnmmo.em | 5 +-
45 ld/emultempl/nds32elf.em | 6 +-
46 ld/emultempl/nto.em | 28 +++---
47 ld/emultempl/pe.em | 20 ++---
48 ld/emultempl/pep.em | 16 ++--
49 ld/emultempl/ppc32elf.em | 4 +-
50 ld/emultempl/ppc64elf.em | 10 +--
51 ld/emultempl/riscvelf.em | 2 +-
52 ld/emultempl/s390.em | 2 +-
53 ld/emultempl/scoreelf.em | 2 +-
54 ld/emultempl/spuelf.em | 20 ++---
55 ld/emultempl/tic6xdsbt.em | 10 +--
56 ld/emultempl/ticoff.em | 4 +-
57 ld/emultempl/v850elf.em | 2 +-
58 ld/emultempl/vms.em | 2 +-
59 ld/emultempl/xtensaelf.em | 12 +--
60 ld/emultempl/z80.em | 2 +-
61 ld/ldcref.c | 8 +-
62 ld/ldelf.c | 34 ++++----
63 ld/ldelfgen.c | 17 ++--
64 ld/ldemul.c | 2 +-
65 ld/ldexp.c | 42 ++++-----
66 ld/ldfile.c | 14 +--
67 ld/ldgram.y | 6 +-
68 ld/ldlang.c | 126 +++++++++++++--------------
69 ld/ldlex.l | 14 ++-
70 ld/ldmain.c | 44 +++++-----
71 ld/ldmisc.c | 28 ++++--
72 ld/ldmisc.h | 1 +
73 ld/ldwrite.c | 22 +++--
74 ld/lexsup.c | 72 ++++++++-------
75 ld/mri.c | 2 +-
76 ld/pe-dll.c | 12 +--
77 ld/plugin.c | 27 +++---
78 55 files changed, 379 insertions(+), 393 deletions(-)
79
80diff --git a/ld/emulparams/call_nop.sh b/ld/emulparams/call_nop.sh
81index 2c3c305f0e8..7dd6dfb130c 100644
82--- a/ld/emulparams/call_nop.sh
83+++ b/ld/emulparams/call_nop.sh
84@@ -20,7 +20,7 @@ PARSE_AND_LIST_ARGS_CASE_Z_CALL_NOP='
85 char *end;
86 params.call_nop_byte = strtoul (optarg + 16 , &end, 0);
87 if (*end)
88- einfo (_("%F%P: invalid number for -z call-nop=prefix-: %s\n"),
89+ fatal (_("%P: invalid number for -z call-nop=prefix-: %s\n"),
90 optarg + 16);
91 params.call_nop_as_suffix = false;
92 }
93@@ -29,12 +29,12 @@ PARSE_AND_LIST_ARGS_CASE_Z_CALL_NOP='
94 char *end;
95 params.call_nop_byte = strtoul (optarg + 16, &end, 0);
96 if (*end)
97- einfo (_("%F%P: invalid number for -z call-nop=suffix-: %s\n"),
98+ fatal (_("%P: invalid number for -z call-nop=suffix-: %s\n"),
99 optarg + 16);
100 params.call_nop_as_suffix = true;
101 }
102 else
103- einfo (_("%F%P: unsupported option: -z %s\n"), optarg);
104+ fatal (_("%P: unsupported option: -z %s\n"), optarg);
105 }
106 '
107
108diff --git a/ld/emulparams/cet.sh b/ld/emulparams/cet.sh
109index 2c627994501..e463441d176 100644
110--- a/ld/emulparams/cet.sh
111+++ b/ld/emulparams/cet.sh
112@@ -29,7 +29,7 @@ PARSE_AND_LIST_ARGS_CASE_Z_CET='
113 | prop_report_ibt
114 | prop_report_shstk);
115 else
116- einfo (_("%F%P: invalid option for -z cet-report=: %s\n"),
117+ fatal (_("%P: invalid option for -z cet-report=: %s\n"),
118 optarg + 11);
119 }
120 '
121diff --git a/ld/emulparams/elf32mcore.sh b/ld/emulparams/elf32mcore.sh
122index 7d433fc0f2d..dc0f5d042e7 100644
123--- a/ld/emulparams/elf32mcore.sh
124+++ b/ld/emulparams/elf32mcore.sh
125@@ -42,6 +42,6 @@ PARSE_AND_LIST_ARGS_CASES='
126 case OPTION_BASE_FILE:
127 link_info.base_file = fopen (optarg, FOPEN_WB);
128 if (link_info.base_file == NULL)
129- einfo (_("%F%P: cannot open base file %s\n"), optarg);
130+ fatal (_("%P: cannot open base file %s\n"), optarg);
131 break;
132 '
133diff --git a/ld/emulparams/x86-64-lam.sh b/ld/emulparams/x86-64-lam.sh
134index fab42ff1df2..6e629ebbac8 100644
135--- a/ld/emulparams/x86-64-lam.sh
136+++ b/ld/emulparams/x86-64-lam.sh
137@@ -25,7 +25,7 @@ PARSE_AND_LIST_ARGS_CASE_Z_LAM='
138 else if (strcmp (optarg + 15, "error") == 0)
139 params.lam_u48_report = prop_report_error;
140 else
141- einfo (_("%F%P: invalid option for -z lam-u48-report=: %s\n"),
142+ fatal (_("%P: invalid option for -z lam-u48-report=: %s\n"),
143 optarg + 15);
144 }
145 else if (strcmp (optarg, "lam-u57") == 0)
146@@ -39,7 +39,7 @@ PARSE_AND_LIST_ARGS_CASE_Z_LAM='
147 else if (strcmp (optarg + 15, "error") == 0)
148 params.lam_u57_report = prop_report_error;
149 else
150- einfo (_("%F%P: invalid option for -z lam-u57-report=: %s\n"),
151+ fatal (_("%P: invalid option for -z lam-u57-report=: %s\n"),
152 optarg + 15);
153 }
154 else if (strncmp (optarg, "lam-report=", 11) == 0)
155@@ -60,7 +60,7 @@ PARSE_AND_LIST_ARGS_CASE_Z_LAM='
156 params.lam_u57_report = prop_report_error;
157 }
158 else
159- einfo (_("%F%P: invalid option for -z lam-report=: %s\n"),
160+ fatal (_("%P: invalid option for -z lam-report=: %s\n"),
161 optarg + 11);
162 }
163 '
164diff --git a/ld/emulparams/x86-64-level-report.sh b/ld/emulparams/x86-64-level-report.sh
165index 518527767a4..0463ad95269 100644
166--- a/ld/emulparams/x86-64-level-report.sh
167+++ b/ld/emulparams/x86-64-level-report.sh
168@@ -16,7 +16,7 @@ PARSE_AND_LIST_ARGS_CASE_Z_X86_64_LEVEL_REPORT='
169 else if (strcmp (optarg + 17, "used") == 0)
170 params.isa_level_report = isa_level_report_used;
171 else
172- einfo (_("%F%P: invalid option for -z isa-level-report=: %s\n"),
173+ fatal (_("%P: invalid option for -z isa-level-report=: %s\n"),
174 optarg + 17);
175 }
176 '
177diff --git a/ld/emulparams/x86-64-level.sh b/ld/emulparams/x86-64-level.sh
178index c46aacf3aff..7e27cf1ea45 100644
179--- a/ld/emulparams/x86-64-level.sh
180+++ b/ld/emulparams/x86-64-level.sh
181@@ -10,7 +10,7 @@ PARSE_AND_LIST_ARGS_CASE_Z_X86_64_LEVEL='
182 char *end;
183 unsigned int level = strtoul (optarg + 8 , &end, 10);
184 if (*end != '\0' || level < 2 || level > 4)
185- einfo (_("%F%P: invalid x86-64 ISA level: %s\n"), optarg);
186+ fatal (_("%P: invalid x86-64 ISA level: %s\n"), optarg);
187 params.isa_level = level;
188 }
189 '
190diff --git a/ld/emultempl/aarch64elf.em b/ld/emultempl/aarch64elf.em
191index 7791aabf16d..afa91afb608 100644
192--- a/ld/emultempl/aarch64elf.em
193+++ b/ld/emultempl/aarch64elf.em
194@@ -324,7 +324,7 @@ aarch64_elf_create_output_section_statements (void)
195 These will only be created if the output format is an AArch64 format,
196 hence we do not support linking and changing output formats at the
197 same time. Use a link followed by objcopy to change output formats. */
198- einfo (_("%F%P: error: cannot change output format "
199+ fatal (_("%P: error: cannot change output format "
200 "whilst linking %s binaries\n"), "AArch64");
201 return;
202 }
203@@ -346,7 +346,7 @@ aarch64_elf_create_output_section_statements (void)
204 bfd_get_arch (link_info.output_bfd),
205 bfd_get_mach (link_info.output_bfd)))
206 {
207- einfo (_("%F%P: can not create BFD: %E\n"));
208+ fatal (_("%P: can not create BFD: %E\n"));
209 return;
210 }
211
212@@ -583,7 +583,7 @@ PARSE_AND_LIST_ARGS_CASES='
213
214 group_size = bfd_scan_vma (optarg, &end, 0);
215 if (*end)
216- einfo (_("%F%P: invalid number `%s'\''\n"), optarg);
217+ fatal (_("%P: invalid number `%s'\''\n"), optarg);
218 }
219 break;
220 '
221diff --git a/ld/emultempl/aix.em b/ld/emultempl/aix.em
222index d69e13cfa91..7754c1607b3 100644
223--- a/ld/emultempl/aix.em
224+++ b/ld/emultempl/aix.em
225@@ -307,7 +307,7 @@ read_file_list (const char *filename)
226 f = fopen (filename, FOPEN_RT);
227 if (f == NULL)
228 {
229- einfo (_("%F%P: cannot open %s\n"), filename);
230+ fatal (_("%P: cannot open %s\n"), filename);
231 return;
232 }
233 if (fseek (f, 0L, SEEK_END) == -1)
234@@ -354,8 +354,8 @@ read_file_list (const char *filename)
235 return;
236
237 error:
238- einfo (_("%F%P: cannot read %s\n"), optarg);
239 fclose (f);
240+ fatal (_("%P: cannot read %s\n"), optarg);
241 }
242
243 static bool
244@@ -706,7 +706,7 @@ gld${EMULATION_NAME}_after_open (void)
245 size = (p->count + 2) * 4;
246 if (!bfd_xcoff_link_record_set (link_info.output_bfd, &link_info,
247 p->h, size))
248- einfo (_("%F%P: bfd_xcoff_link_record_set failed: %E\n"));
249+ fatal (_("%P: bfd_xcoff_link_record_set failed: %E\n"));
250 }
251 }
252
253@@ -736,9 +736,9 @@ gld${EMULATION_NAME}_before_allocation (void)
254
255 h = bfd_link_hash_lookup (link_info.hash, el->name, false, false, false);
256 if (h == NULL)
257- einfo (_("%F%P: bfd_link_hash_lookup of export symbol failed: %E\n"));
258+ fatal (_("%P: bfd_link_hash_lookup of export symbol failed: %E\n"));
259 if (!bfd_xcoff_export_symbol (link_info.output_bfd, &link_info, h))
260- einfo (_("%F%P: bfd_xcoff_export_symbol failed: %E\n"));
261+ fatal (_("%P: bfd_xcoff_export_symbol failed: %E\n"));
262 }
263
264 /* Track down all relocations called for by the linker script (these
265@@ -821,7 +821,7 @@ gld${EMULATION_NAME}_before_allocation (void)
266 (link_info.output_bfd, &link_info, libpath, entry_symbol.name,
267 file_align, maxstack, maxdata, gc && !unix_ld,
268 modtype, textro, flags, special_sections, rtld))
269- einfo (_("%F%P: failed to set dynamic section sizes: %E\n"));
270+ fatal (_("%P: failed to set dynamic section sizes: %E\n"));
271
272 /* Look through the special sections, and put them in the right
273 place in the link ordering. This is especially magic. */
274@@ -843,8 +843,8 @@ gld${EMULATION_NAME}_before_allocation (void)
275 is = NULL;
276 os = lang_output_section_get (sec->output_section);
277 if (os == NULL)
278- einfo (_("%F%P: can't find output section %s\n"),
279- sec->output_section->name);
280+ fatal (_("%P: can't find output section %pA\n"),
281+ sec->output_section);
282
283 for (pls = &os->children.head; *pls != NULL; pls = &(*pls)->header.next)
284 {
285@@ -880,8 +880,7 @@ gld${EMULATION_NAME}_before_allocation (void)
286
287 if (is == NULL)
288 {
289- einfo (_("%F%P: can't find %s in output section\n"),
290- bfd_section_name (sec));
291+ fatal (_("%P: can't find %pA in output section\n"), sec);
292 }
293
294 /* Now figure out where the section should go. */
295@@ -1134,7 +1133,7 @@ gld${EMULATION_NAME}_after_allocation (void)
296
297 /* Now that everything is in place, finalize the dynamic sections. */
298 if (!bfd_xcoff_build_dynamic_sections (link_info.output_bfd, &link_info))
299- einfo (_("%F%P: failed to layout dynamic sections: %E\n"));
300+ fatal (_("%P: failed to layout dynamic sections: %E\n"));
301
302 if (!bfd_link_relocatable (&link_info))
303 {
304@@ -1285,7 +1284,7 @@ gld${EMULATION_NAME}_read_file (const char *filename, bool import)
305 if (f == NULL)
306 {
307 bfd_set_error (bfd_error_system_call);
308- einfo ("%F%P: %s: %E\n", filename);
309+ fatal ("%P: %s: %E\n", filename);
310 return;
311 }
312
313@@ -1347,7 +1346,7 @@ gld${EMULATION_NAME}_read_file (const char *filename, bool import)
314 obstack_free (o, obstack_base (o));
315 }
316 else if (*s == '(')
317- einfo (_("%F%P:%s:%d: #! ([member]) is not supported "
318+ fatal (_("%P:%s:%d: #! ([member]) is not supported "
319 "in import files\n"),
320 filename, linenumber);
321 else
322@@ -1364,7 +1363,7 @@ gld${EMULATION_NAME}_read_file (const char *filename, bool import)
323 *s = '\0';
324 if (!bfd_xcoff_split_import_path (link_info.output_bfd,
325 start, &imppath, &impfile))
326- einfo (_("%F%P: could not parse import path: %E\n"));
327+ fatal (_("%P: could not parse import path: %E\n"));
328 while (ISSPACE (cs))
329 {
330 ++s;
331@@ -1519,10 +1518,10 @@ gld${EMULATION_NAME}_find_relocs (lang_statement_union_type *s)
332
333 rs = &s->reloc_statement;
334 if (rs->name == NULL)
335- einfo (_("%F%P: only relocations against symbols are permitted\n"));
336+ fatal (_("%P: only relocations against symbols are permitted\n"));
337 if (!bfd_xcoff_link_count_reloc (link_info.output_bfd, &link_info,
338 rs->name))
339- einfo (_("%F%P: bfd_xcoff_link_count_reloc failed: %E\n"));
340+ fatal (_("%P: bfd_xcoff_link_count_reloc failed: %E\n"));
341 }
342
343 if (s->header.type == lang_assignment_statement_enum)
344@@ -1551,7 +1550,7 @@ gld${EMULATION_NAME}_find_exp_assignment (etree_type *exp)
345 if (!bfd_xcoff_record_link_assignment (link_info.output_bfd,
346 &link_info,
347 exp->assign.dst))
348- einfo (_("%F%P: failed to record assignment to %s: %E\n"),
349+ fatal (_("%P: failed to record assignment to %s: %E\n"),
350 exp->assign.dst);
351 }
352 gld${EMULATION_NAME}_find_exp_assignment (exp->assign.src);
353@@ -1646,7 +1645,7 @@ gld${EMULATION_NAME}_create_output_section_statements (void)
354 bfd_get_arch (link_info.output_bfd),
355 bfd_get_mach (link_info.output_bfd)))
356 {
357- einfo (_("%F%P: can not create stub BFD: %E\n"));
358+ fatal (_("%P: can not create stub BFD: %E\n"));
359 return;
360 }
361
362@@ -1656,7 +1655,7 @@ gld${EMULATION_NAME}_create_output_section_statements (void)
363
364 /* Pass linker params to the back-end. */
365 if (!bfd_xcoff_link_init (&link_info, &params))
366- einfo (_("%F%P: can not init BFD: %E\n"));
367+ fatal (_("%P: can not init BFD: %E\n"));
368
369 /* __rtinit */
370 if (link_info.init_function != NULL
371@@ -1673,7 +1672,7 @@ gld${EMULATION_NAME}_create_output_section_statements (void)
372 bfd_get_arch (link_info.output_bfd),
373 bfd_get_mach (link_info.output_bfd)))
374 {
375- einfo (_("%F%P: can not create BFD: %E\n"));
376+ fatal (_("%P: can not create BFD: %E\n"));
377 return;
378 }
379
380@@ -1683,7 +1682,7 @@ gld${EMULATION_NAME}_create_output_section_statements (void)
381 link_info.fini_function,
382 rtld))
383 {
384- einfo (_("%F%P: can not create BFD: %E\n"));
385+ fatal (_("%P: can not create BFD: %E\n"));
386 return;
387 }
388
389diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em
390index 02a97e7c1ff..6f652c59a3c 100644
391--- a/ld/emultempl/armelf.em
392+++ b/ld/emultempl/armelf.em
393@@ -521,7 +521,7 @@ arm_elf_create_output_section_statements (void)
394 These will only be created if the output format is an arm format,
395 hence we do not support linking and changing output formats at the
396 same time. Use a link followed by objcopy to change output formats. */
397- einfo (_("%F%P: error: cannot change output format "
398+ fatal (_("%P: error: cannot change output format "
399 "whilst linking %s binaries\n"), "ARM");
400 return;
401 }
402@@ -532,10 +532,10 @@ arm_elf_create_output_section_statements (void)
403 bfd_get_target (link_info.output_bfd));
404
405 if (params.in_implib_bfd == NULL)
406- einfo (_("%F%P: %s: can't open: %E\n"), in_implib_filename);
407+ fatal (_("%P: %s: can't open: %E\n"), in_implib_filename);
408
409 if (!bfd_check_format (params.in_implib_bfd, bfd_object))
410- einfo (_("%F%P: %s: not a relocatable file: %E\n"), in_implib_filename);
411+ fatal (_("%P: %s: not a relocatable file: %E\n"), in_implib_filename);
412 }
413
414 bfd_elf32_arm_set_target_params (link_info.output_bfd, &link_info, &params);
415@@ -549,7 +549,7 @@ arm_elf_create_output_section_statements (void)
416 bfd_get_arch (link_info.output_bfd),
417 bfd_get_mach (link_info.output_bfd)))
418 {
419- einfo (_("%F%P: can not create BFD: %E\n"));
420+ fatal (_("%P: can not create BFD: %E\n"));
421 return;
422 }
423
424@@ -709,7 +709,7 @@ PARSE_AND_LIST_ARGS_CASES='
425
426 group_size = bfd_scan_vma (optarg, &end, 0);
427 if (*end)
428- einfo (_("%F%P: invalid number `%s'\''\n"), optarg);
429+ fatal (_("%P: invalid number `%s'\''\n"), optarg);
430 }
431 break;
432
433diff --git a/ld/emultempl/avrelf.em b/ld/emultempl/avrelf.em
434index 0945702bfb6..ad2de99feee 100644
435--- a/ld/emultempl/avrelf.em
436+++ b/ld/emultempl/avrelf.em
437@@ -116,7 +116,7 @@ avr_elf_create_output_section_statements (void)
438
439 if (bfd_get_flavour (link_info.output_bfd) != bfd_target_elf_flavour)
440 {
441- einfo (_("%F%P: error: cannot change output format "
442+ fatal (_("%P: error: cannot change output format "
443 "whilst linking %s binaries\n"), "AVR");
444 return;
445 }
446diff --git a/ld/emultempl/beos.em b/ld/emultempl/beos.em
447index 52e615b8b1f..4082449f461 100644
448--- a/ld/emultempl/beos.em
449+++ b/ld/emultempl/beos.em
450@@ -210,7 +210,7 @@ set_pe_subsystem (void)
451 return;
452 }
453 }
454- einfo (_("%F%P: invalid subsystem type %s\n"), optarg);
455+ fatal (_("%P: invalid subsystem type %s\n"), optarg);
456 }
457
458
459@@ -220,9 +220,7 @@ set_pe_value (char *name)
460 char *end;
461 set_pe_name (name, strtoul (optarg, &end, 0));
462 if (end == optarg)
463- {
464- einfo (_("%F%P: invalid hex number for PE parameter '%s'\n"), optarg);
465- }
466+ fatal (_("%P: invalid hex number for PE parameter '%s'\n"), optarg);
467
468 optarg = end;
469 }
470@@ -237,9 +235,7 @@ set_pe_stack_heap (char *resname, char *comname)
471 set_pe_value (comname);
472 }
473 else if (*optarg)
474- {
475- einfo (_("%F%P: strange hex info for PE parameter '%s'\n"), optarg);
476- }
477+ fatal (_("%P: strange hex info for PE parameter '%s'\n"), optarg);
478 }
479
480
481@@ -254,7 +250,7 @@ gld${EMULATION_NAME}_handle_option (int optc)
482 case OPTION_BASE_FILE:
483 link_info.base_file = fopen (optarg, FOPEN_WB);
484 if (link_info.base_file == NULL)
485- einfo (_("%F%P: cannot open base file %s\n"), optarg);
486+ fatal (_("%P: cannot open base file %s\n"), optarg);
487 break;
488
489 /* PE options */
490@@ -363,9 +359,7 @@ gld${EMULATION_NAME}_after_open (void)
491 FIXME: This should be done via a function, rather than by
492 including an internal BFD header. */
493 if (!obj_pe (link_info.output_bfd))
494- {
495- einfo (_("%F%P: PE operations on non PE file\n"));
496- }
497+ fatal (_("%P: PE operations on non PE file\n"));
498
499 pe_data(link_info.output_bfd)->pe_opthdr = pe;
500 pe_data(link_info.output_bfd)->dll = init[DLLOFF].value;
501@@ -414,12 +408,12 @@ sort_by_file_name (const void *a, const void *b)
502
503 if (!bfd_get_section_contents (sa->owner, sa, &a_sec, (file_ptr) 0,
504 (bfd_size_type) sizeof (a_sec)))
505- einfo (_("%F%P: %pB: can't read contents of section .idata: %E\n"),
506+ fatal (_("%P: %pB: can't read contents of section .idata: %E\n"),
507 sa->owner);
508
509 if (!bfd_get_section_contents (sb->owner, sb, &b_sec, (file_ptr) 0,
510 (bfd_size_type) sizeof (b_sec)))
511- einfo (_("%F%P: %pB: can't read contents of section .idata: %E\n"),
512+ fatal (_("%P: %pB: can't read contents of section .idata: %E\n"),
513 sb->owner);
514
515 i = a_sec < b_sec ? -1 : 0;
516@@ -651,7 +645,7 @@ gld${EMULATION_NAME}_place_orphan (asection *s,
517 /* Everything from the '\$' on gets deleted so don't allow '\$' as the
518 first character. */
519 if (*secname == '\$')
520- einfo (_("%F%P: section %s has '\$' as first character\n"), secname);
521+ fatal (_("%P: section %s has '\$' as first character\n"), secname);
522 if (strchr (secname + 1, '\$') == NULL)
523 return NULL;
524
525@@ -681,7 +675,7 @@ gld${EMULATION_NAME}_place_orphan (asection *s,
526 }
527 ps[0] = 0;
528 if (l == NULL)
529- einfo (_("%F%P: *(%s\$) missing from linker script\n"), output_secname);
530+ fatal (_("%P: *(%s\$) missing from linker script\n"), output_secname);
531
532 /* Link the input section in and we're done for now.
533 The sections still have to be sorted, but that has to wait until
534diff --git a/ld/emultempl/cr16elf.em b/ld/emultempl/cr16elf.em
535index 27e616a823f..69ad393f124 100644
536--- a/ld/emultempl/cr16elf.em
537+++ b/ld/emultempl/cr16elf.em
538@@ -58,7 +58,7 @@ cr16_elf_after_open (void)
539 COFF and ELF. */
540 if (bfd_get_flavour (abfd) != bfd_target_coff_flavour
541 && bfd_get_flavour (abfd) != bfd_target_elf_flavour)
542- einfo (_("%F%P: %pB: all input objects must be COFF or ELF "
543+ fatal (_("%P: %pB: all input objects must be COFF or ELF "
544 "for --embedded-relocs\n"));
545
546 datasec = bfd_get_section_by_name (abfd, ".data.rel");
547@@ -82,7 +82,7 @@ cr16_elf_after_open (void)
548 | SEC_IN_MEMORY))
549 || !bfd_set_section_alignment (relsec, 2)
550 || !bfd_set_section_size (relsec, datasec->reloc_count * 8))
551- einfo (_("%F%P: %pB: can not create .emreloc section: %E\n"));
552+ fatal (_("%P: %pB: can not create .emreloc section: %E\n"));
553 }
554
555 /* Double check that all other data sections are empty, as is
556diff --git a/ld/emultempl/cskyelf.em b/ld/emultempl/cskyelf.em
557index ab7f9656889..525e99b68fe 100644
558--- a/ld/emultempl/cskyelf.em
559+++ b/ld/emultempl/cskyelf.em
560@@ -151,7 +151,7 @@ csky_elf_create_output_section_statements (void)
561 bfd_get_arch (link_info.output_bfd),
562 bfd_get_mach (link_info.output_bfd)))
563 {
564- einfo (_("%F%P: can not create BFD: %E\n"));
565+ fatal (_("%P: can not create BFD: %E\n"));
566 return;
567 }
568
569@@ -318,7 +318,7 @@ PARSE_AND_LIST_ARGS_CASES='
570
571 group_size = bfd_scan_vma (optarg, &end, 0);
572 if (*end)
573- einfo (_("%F%P: invalid number `%s'\''\n"), optarg);
574+ fatal (_("%P: invalid number `%s'\''\n"), optarg);
575 }
576 break;
577 '
578diff --git a/ld/emultempl/elf.em b/ld/emultempl/elf.em
579index 9dcb52e7514..431205fe644 100644
580--- a/ld/emultempl/elf.em
581+++ b/ld/emultempl/elf.em
582@@ -886,12 +886,12 @@ gld${EMULATION_NAME}_handle_option (int optc)
583 {
584 #ifndef HAVE_ZSTD
585 if (config.compress_debug == COMPRESS_DEBUG_ZSTD)
586- einfo (_ ("%F%P: --compress-debug-sections=zstd: ld is not built "
587- "with zstd support\n"));
588+ fatal (_("%P: --compress-debug-sections=zstd: ld is not built "
589+ "with zstd support\n"));
590 #endif
591 }
592 if (config.compress_debug == COMPRESS_UNKNOWN)
593- einfo (_("%F%P: invalid --compress-debug-sections option: \`%s'\n"),
594+ fatal (_("%P: invalid --compress-debug-sections option: \`%s'\n"),
595 optarg);
596 break;
597
598@@ -953,7 +953,7 @@ fragment <<EOF
599 link_info.emit_gnu_hash = true;
600 }
601 else
602- einfo (_("%F%P: invalid hash style \`%s'\n"), optarg);
603+ fatal (_("%P: invalid hash style \`%s'\n"), optarg);
604 break;
605
606 EOF
607@@ -973,7 +973,7 @@ fragment <<EOF
608 link_info.maxpagesize = strtoul (optarg + 14, &end, 0);
609 if (*end
610 || (link_info.maxpagesize & (link_info.maxpagesize - 1)) != 0)
611- einfo (_("%F%P: invalid maximum page size \`%s'\n"),
612+ fatal (_("%P: invalid maximum page size \`%s'\n"),
613 optarg + 14);
614 link_info.maxpagesize_is_set = true;
615 }
616@@ -983,7 +983,7 @@ fragment <<EOF
617 link_info.commonpagesize = strtoul (optarg + 17, &end, 0);
618 if (*end
619 || (link_info.commonpagesize & (link_info.commonpagesize - 1)) != 0)
620- einfo (_("%F%P: invalid common page size \`%s'\n"),
621+ fatal (_("%P: invalid common page size \`%s'\n"),
622 optarg + 17);
623 link_info.commonpagesize_is_set = true;
624 }
625@@ -992,7 +992,7 @@ fragment <<EOF
626 char *end;
627 link_info.stacksize = strtoul (optarg + 11, &end, 0);
628 if (*end || link_info.stacksize < 0)
629- einfo (_("%F%P: invalid stack size \`%s'\n"), optarg + 11);
630+ fatal (_("%P: invalid stack size \`%s'\n"), optarg + 11);
631 if (!link_info.stacksize)
632 /* Use -1 for explicit no-stack, because zero means
633 'default'. */
634@@ -1031,7 +1031,7 @@ fragment <<EOF
635 else if (strcmp (optarg, "start-stop-visibility=protected") == 0)
636 link_info.start_stop_visibility = STV_PROTECTED;
637 else
638- einfo (_("%F%P: invalid visibility in \`-z %s'; "
639+ fatal (_("%P: invalid visibility in \`-z %s'; "
640 "must be default, internal, hidden, or protected"),
641 optarg);
642 }
643diff --git a/ld/emultempl/hppaelf.em b/ld/emultempl/hppaelf.em
644index 512f7d9dd44..8dfa257b304 100644
645--- a/ld/emultempl/hppaelf.em
646+++ b/ld/emultempl/hppaelf.em
647@@ -82,7 +82,7 @@ hppaelf_create_output_section_statements (void)
648 bfd_get_arch (link_info.output_bfd),
649 bfd_get_mach (link_info.output_bfd)))
650 {
651- einfo (_("%F%P: can not create BFD: %E\n"));
652+ fatal (_("%P: can not create BFD: %E\n"));
653 return;
654 }
655
656@@ -346,7 +346,7 @@ PARSE_AND_LIST_ARGS_CASES='
657 const char *end;
658 group_size = bfd_scan_vma (optarg, &end, 0);
659 if (*end)
660- einfo (_("%F%P: invalid number `%s'\''\n"), optarg);
661+ fatal (_("%P: invalid number `%s'\''\n"), optarg);
662 }
663 break;
664 '
665diff --git a/ld/emultempl/kvxelf.em b/ld/emultempl/kvxelf.em
666index cbfde0ed24c..186f1483037 100644
667--- a/ld/emultempl/kvxelf.em
668+++ b/ld/emultempl/kvxelf.em
669@@ -35,9 +35,8 @@ elf${ELFSIZE}_kvx_before_allocation (void)
670 EOF
671 if test x"${EMULATION_NAME}" != x"elf64kvx_linux"; then
672 fragment <<EOF
673- if (bfd_link_pie (&link_info)) {
674- einfo (_("%F:%P: -pie not supported\n"));
675- }
676+ if (bfd_link_pie (&link_info))
677+ fatal (_(":%P: -pie not supported\n"));
678 EOF
679 fi
680 fragment <<EOF
681@@ -300,7 +299,7 @@ kvx_elf_create_output_section_statements (void)
682 ldlang_add_file (stub_file);
683
684 if (!kvx_elf${ELFSIZE}_init_stub_bfd (&link_info, stub_file->the_bfd))
685- einfo ("%F%P: can not init BFD: %E\n");
686+ einfo ("%P: can not init BFD: %E\n");
687 }
688
689
690diff --git a/ld/emultempl/loongarchelf.em b/ld/emultempl/loongarchelf.em
691index de64b1d30de..928fd83ab15 100644
692--- a/ld/emultempl/loongarchelf.em
693+++ b/ld/emultempl/loongarchelf.em
694@@ -83,11 +83,11 @@ gld${EMULATION_NAME}_after_allocation (void)
695 && !bfd_link_relocatable (&link_info))
696 {
697 if (lang_phdr_list == NULL)
698- elf_seg_map (link_info.output_bfd) = NULL;
699+ elf_seg_map (link_info.output_bfd) = NULL;
700 if (!_bfd_elf_map_sections_to_segments (link_info.output_bfd,
701 &link_info,
702 NULL))
703- einfo (_("%F%P: map sections to segments failed: %E\n"));
704+ fatal (_("%P: map sections to segments failed: %E\n"));
705 }
706
707 /* Adjust program header size and .eh_frame_hdr size before
708diff --git a/ld/emultempl/m68hc1xelf.em b/ld/emultempl/m68hc1xelf.em
709index a7c3a3eec48..155b95349ab 100644
710--- a/ld/emultempl/m68hc1xelf.em
711+++ b/ld/emultempl/m68hc1xelf.em
712@@ -159,7 +159,7 @@ m68hc11elf_create_output_section_statements (void)
713 bfd_get_arch (link_info.output_bfd),
714 bfd_get_mach (link_info.output_bfd)))
715 {
716- einfo (_("%F%P: can not create BFD: %E\n"));
717+ fatal (_("%P: can not create BFD: %E\n"));
718 return;
719 }
720
721diff --git a/ld/emultempl/m68kelf.em b/ld/emultempl/m68kelf.em
722index c195812b85a..91fb3f8502a 100644
723--- a/ld/emultempl/m68kelf.em
724+++ b/ld/emultempl/m68kelf.em
725@@ -82,7 +82,7 @@ m68k_elf_after_open (void)
726 asection *datasec;
727
728 if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
729- einfo (_("%F%P: %pB: all input objects must be ELF "
730+ fatal (_("%P: %pB: all input objects must be ELF "
731 "for --embedded-relocs\n"));
732
733 datasec = bfd_get_section_by_name (abfd, ".data");
734@@ -106,7 +106,7 @@ m68k_elf_after_open (void)
735 if (relsec == NULL
736 || !bfd_set_section_alignment (relsec, 2)
737 || !bfd_set_section_size (relsec, datasec->reloc_count * 12))
738- einfo (_("%F%P: %pB: can not create .emreloc section: %E\n"));
739+ fatal (_("%P: %pB: can not create .emreloc section: %E\n"));
740 }
741
742 /* Double check that all other data sections are empty, as is
743diff --git a/ld/emultempl/metagelf.em b/ld/emultempl/metagelf.em
744index 85b8d379435..b6e59273dda 100644
745--- a/ld/emultempl/metagelf.em
746+++ b/ld/emultempl/metagelf.em
747@@ -59,7 +59,7 @@ metagelf_create_output_section_statements (void)
748 bfd_get_arch (link_info.output_bfd),
749 bfd_get_mach (link_info.output_bfd)))
750 {
751- einfo (_("%F%P: can not create BFD: %E\n"));
752+ fatal (_("%P: can not create BFD: %E\n"));
753 return;
754 }
755
756@@ -305,7 +305,7 @@ PARSE_AND_LIST_ARGS_CASES='
757 const char *end;
758 group_size = bfd_scan_vma (optarg, &end, 0);
759 if (*end)
760- einfo (_("%F%P: invalid number `%s'\''\n"), optarg);
761+ fatal (_("%P: invalid number `%s'\''\n"), optarg);
762 }
763 break;
764 '
765diff --git a/ld/emultempl/mipself.em b/ld/emultempl/mipself.em
766index 89e7a8945be..9aa15bda6e9 100644
767--- a/ld/emultempl/mipself.em
768+++ b/ld/emultempl/mipself.em
769@@ -152,7 +152,7 @@ mips_add_stub_section (const char *stub_sec_name, asection *input_section,
770 bfd_get_arch (link_info.output_bfd),
771 bfd_get_mach (link_info.output_bfd)))
772 {
773- einfo (_("%F%P: can not create BFD: %E\n"));
774+ fatal (_("%P: can not create BFD: %E\n"));
775 return NULL;
776 }
777 stub_bfd->flags |= BFD_LINKER_CREATED;
778diff --git a/ld/emultempl/mmix-elfnmmo.em b/ld/emultempl/mmix-elfnmmo.em
779index 8c62bf8274d..72589416ef0 100644
780--- a/ld/emultempl/mmix-elfnmmo.em
781+++ b/ld/emultempl/mmix-elfnmmo.em
782@@ -113,10 +113,7 @@ mmix_after_allocation (void)
783 bfd_set_section_vma (sec, 0);
784
785 if (!_bfd_mmix_after_linker_allocation (link_info.output_bfd, &link_info))
786- {
787- /* This is a fatal error; make einfo call not return. */
788- einfo (_("%F%P: can't finalize linker-allocated global registers\n"));
789- }
790+ fatal (_("%P: can't finalize linker-allocated global registers\n"));
791 }
792 EOF
793
794diff --git a/ld/emultempl/nds32elf.em b/ld/emultempl/nds32elf.em
795index 9d596838078..e8c72d934f8 100644
796--- a/ld/emultempl/nds32elf.em
797+++ b/ld/emultempl/nds32elf.em
798@@ -44,7 +44,7 @@ nds32_elf_create_output_section_statements (void)
799 if (strstr (bfd_get_target (link_info.output_bfd), "nds32") == NULL)
800 {
801 /* Check the output target is nds32. */
802- einfo (_("%F%P: error: cannot change output format whilst "
803+ fatal (_("%P: error: cannot change output format whilst "
804 "linking %s binaries\n"), "NDS32");
805 return;
806 }
807@@ -96,7 +96,7 @@ nds32_elf_after_open (void)
808 && abi_ver != (elf_elfheader (abfd)->e_flags & EF_NDS_ABI))
809 {
810 /* Incompatible objects. */
811- einfo (_("%F%P: %pB: ABI version of object files mismatched\n"),
812+ fatal (_("%P: %pB: ABI version of object files mismatched\n"),
813 abfd);
814 }
815 }
816@@ -183,7 +183,7 @@ PARSE_AND_LIST_ARGS_CASES='
817 {
818 sym_ld_script = fopen (optarg, FOPEN_WT);
819 if(sym_ld_script == NULL)
820- einfo (_("%F%P: cannot open map file %s: %E\n"), optarg);
821+ fatal (_("%P: cannot open map file %s: %E\n"), optarg);
822 }
823 break;
824 case OPTION_HYPER_RELAX:
825diff --git a/ld/emultempl/nto.em b/ld/emultempl/nto.em
826index 873b943c45d..ee00c79c3cd 100644
827--- a/ld/emultempl/nto.em
828+++ b/ld/emultempl/nto.em
829@@ -51,7 +51,7 @@ nto_create_QNX_note_section(int type)
830 is called before this function, stub_file should already be defined. */
831 if (!stub_file)
832 {
833- einfo (_("%F%P: cannot create .note section in stub BFD.\n"));
834+ fatal (_("%P: cannot create .note section in stub BFD.\n"));
835 return NULL;
836 }
837
838@@ -60,7 +60,7 @@ nto_create_QNX_note_section(int type)
839 note_sec = bfd_make_section_anyway_with_flags (stub_file->the_bfd, ".note", flags);
840 if (! note_sec)
841 {
842- einfo (_("%F%P: failed to create .note section\n"));
843+ fatal (_("%P: failed to create .note section\n"));
844 return NULL;
845 }
846
847@@ -101,7 +101,7 @@ nto_lookup_QNX_note_section(int type)
848 sec->contents = xmalloc(sec->size);
849 if (!bfd_get_section_contents (sec->owner, sec, sec->contents, (file_ptr) 0,
850 sec->size))
851- einfo (_("%F%P: %pB: can't read contents of section .note: %E\n"),
852+ fatal (_("%P: %pB: can't read contents of section .note: %E\n"),
853 sec->owner);
854
855 e_note = (Elf_External_Note *) sec->contents;
856@@ -144,7 +144,7 @@ nto_add_note_section (void) {
857
858 if (nto_lazy_stack && !link_info.stacksize)
859 {
860- einfo (_("%F%P: error: --lazy-stack must follow -zstack-size=<size>\n"));
861+ fatal (_("%P: error: --lazy-stack must follow -zstack-size=<size>\n"));
862 return;
863 }
864
865@@ -198,22 +198,22 @@ PARSE_AND_LIST_LONGOPTS=${PARSE_AND_LIST_LONGOPTS}'
866 PARSE_AND_LIST_OPTIONS=${PARSE_AND_LIST_OPTIONS}'
867 fprintf (file, _("\
868 --stack <size> Set size of the initial stack\n\
869- --lazy-stack Set lazy allocation of stack\n\
870+ --lazy-stack Set lazy allocation of stack\n\
871 "));
872 '
873
874 PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LIST_ARGS_CASES}'
875 case OPTION_STACK:
876 {
877- char *end;
878- link_info.stacksize = strtoul (optarg, &end, 0);
879- if (*end || link_info.stacksize < 0)
880- einfo (_("%F%P: invalid stack size `%s'\''\n"), optarg + 11);
881- if (!link_info.stacksize)
882- /* Use -1 for explicit no-stack, because zero means
883- 'default'. */
884- link_info.stacksize = -1;
885- break;
886+ char *end;
887+ link_info.stacksize = strtoul (optarg, &end, 0);
888+ if (*end || link_info.stacksize < 0)
889+ fatal (_("%P: invalid stack size `%s'\''\n"), optarg + 11);
890+ if (!link_info.stacksize)
891+ /* Use -1 for explicit no-stack, because zero means
892+ 'default'. */
893+ link_info.stacksize = -1;
894+ break;
895 }
896 case OPTION_LAZY_STACK:
897 nto_lazy_stack = true;
898diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
899index 5fb14c9a4a6..9a2b576a6ac 100644
900--- a/ld/emultempl/pe.em
901+++ b/ld/emultempl/pe.em
902@@ -648,7 +648,7 @@ set_pe_subsystem (void)
903
904 if (v[i].name == NULL)
905 {
906- einfo (_("%F%P: invalid subsystem type %s\n"), optarg);
907+ fatal (_("%P: invalid subsystem type %s\n"), optarg);
908 return;
909 }
910
911@@ -669,7 +669,7 @@ set_pe_value (char *name)
912 set_pe_name (name, strtoul (optarg, &end, 0));
913
914 if (end == optarg)
915- einfo (_("%F%P: invalid hex number for PE parameter '%s'\n"), optarg);
916+ fatal (_("%P: invalid hex number for PE parameter '%s'\n"), optarg);
917
918 optarg = end;
919 }
920@@ -686,7 +686,7 @@ set_pe_stack_heap (char *resname, char *comname)
921 set_pe_value (comname);
922 }
923 else if (*optarg)
924- einfo (_("%F%P: strange hex info for PE parameter '%s'\n"), optarg);
925+ fatal (_("%P: strange hex info for PE parameter '%s'\n"), optarg);
926 }
927
928 #define DEFAULT_BUILD_ID_STYLE "md5"
929@@ -702,7 +702,7 @@ gld${EMULATION_NAME}_handle_option (int optc)
930 case OPTION_BASE_FILE:
931 link_info.base_file = fopen (optarg, FOPEN_WB);
932 if (link_info.base_file == NULL)
933- einfo (_("%F%P: cannot open base file %s\n"), optarg);
934+ fatal (_("%P: cannot open base file %s\n"), optarg);
935 break;
936
937 /* PE options. */
938@@ -1231,7 +1231,7 @@ make_runtime_ref (void)
939 = bfd_wrapped_link_hash_lookup (link_info.output_bfd, &link_info,
940 rr, true, false, true);
941 if (!h)
942- einfo (_("%F%P: bfd_link_hash_lookup failed: %E\n"));
943+ fatal (_("%P: bfd_link_hash_lookup failed: %E\n"));
944 else
945 {
946 if (h->type == bfd_link_hash_new)
947@@ -1529,7 +1529,7 @@ gld${EMULATION_NAME}_after_open (void)
948 if (bfd_get_flavour (link_info.output_bfd) != bfd_target_coff_flavour
949 || coff_data (link_info.output_bfd) == NULL
950 || !obj_pe (link_info.output_bfd))
951- einfo (_("%F%P: cannot perform PE operations on non PE output file '%pB'\n"),
952+ fatal (_("%P: cannot perform PE operations on non PE output file '%pB'\n"),
953 link_info.output_bfd);
954
955 pe_data (link_info.output_bfd)->pe_opthdr = pe;
956@@ -1602,7 +1602,7 @@ gld${EMULATION_NAME}_after_open (void)
957 These will only be created if the output format is an arm format,
958 hence we do not support linking and changing output formats at the
959 same time. Use a link followed by objcopy to change output formats. */
960- einfo (_("%F%P: error: cannot change output format "
961+ fatal (_("%P: error: cannot change output format "
962 "whilst linking %s binaries\n"), "ARM");
963 return;
964 }
965@@ -1662,7 +1662,7 @@ gld${EMULATION_NAME}_after_open (void)
966
967 if (!bfd_generic_link_read_symbols (is->the_bfd))
968 {
969- einfo (_("%F%P: %pB: could not read symbols: %E\n"),
970+ fatal (_("%P: %pB: could not read symbols: %E\n"),
971 is->the_bfd);
972 return;
973 }
974@@ -1849,7 +1849,7 @@ gld${EMULATION_NAME}_after_open (void)
975
976 if (!bfd_generic_link_read_symbols (is->the_bfd))
977 {
978- einfo (_("%F%P: %pB: could not read symbols: %E\n"),
979+ fatal (_("%P: %pB: could not read symbols: %E\n"),
980 is->the_bfd);
981 return;
982 }
983@@ -1960,7 +1960,7 @@ gld${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIBU
984
985 h = bfd_link_hash_lookup (link_info.hash, buf, true, true, true);
986 if (h == (struct bfd_link_hash_entry *) NULL)
987- einfo (_("%F%P: bfd_link_hash_lookup failed: %E\n"));
988+ fatal (_("%P: bfd_link_hash_lookup failed: %E\n"));
989 if (h->type == bfd_link_hash_new)
990 {
991 h->type = bfd_link_hash_undefined;
992diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em
993index df74352e4df..440c0bf5fc4 100644
994--- a/ld/emultempl/pep.em
995+++ b/ld/emultempl/pep.em
996@@ -625,7 +625,7 @@ set_pep_subsystem (void)
997
998 if (v[i].name == NULL)
999 {
1000- einfo (_("%F%P: invalid subsystem type %s\n"), optarg);
1001+ fatal (_("%P: invalid subsystem type %s\n"), optarg);
1002 return;
1003 }
1004
1005@@ -646,7 +646,7 @@ set_pep_value (char *name)
1006 set_pep_name (name, (bfd_vma) strtoull (optarg, &end, 0));
1007
1008 if (end == optarg)
1009- einfo (_("%F%P: invalid hex number for PE parameter '%s'\n"), optarg);
1010+ fatal (_("%P: invalid hex number for PE parameter '%s'\n"), optarg);
1011
1012 optarg = end;
1013 }
1014@@ -663,7 +663,7 @@ set_pep_stack_heap (char *resname, char *comname)
1015 set_pep_value (comname);
1016 }
1017 else if (*optarg)
1018- einfo (_("%F%P: strange hex info for PE parameter '%s'\n"), optarg);
1019+ fatal (_("%P: strange hex info for PE parameter '%s'\n"), optarg);
1020 }
1021
1022 #define DEFAULT_BUILD_ID_STYLE "md5"
1023@@ -680,7 +680,7 @@ gld${EMULATION_NAME}_handle_option (int optc)
1024 case OPTION_BASE_FILE:
1025 link_info.base_file = fopen (optarg, FOPEN_WB);
1026 if (link_info.base_file == NULL)
1027- einfo (_("%F%P: cannot open base file %s\n"), optarg);
1028+ fatal (_("%P: cannot open base file %s\n"), optarg);
1029 break;
1030
1031 /* PE options. */
1032@@ -1233,7 +1233,7 @@ make_runtime_ref (void)
1033 = bfd_wrapped_link_hash_lookup (link_info.output_bfd, &link_info,
1034 rr, true, false, true);
1035 if (!h)
1036- einfo (_("%F%P: bfd_link_hash_lookup failed: %E\n"));
1037+ fatal (_("%P: bfd_link_hash_lookup failed: %E\n"));
1038 else
1039 {
1040 if (h->type == bfd_link_hash_new)
1041@@ -1533,7 +1533,7 @@ gld${EMULATION_NAME}_after_open (void)
1042 if (bfd_get_flavour (link_info.output_bfd) != bfd_target_coff_flavour
1043 || coff_data (link_info.output_bfd) == NULL
1044 || !obj_pe (link_info.output_bfd))
1045- einfo (_("%F%P: cannot perform PE operations on non PE output file '%pB'\n"),
1046+ fatal (_("%P: cannot perform PE operations on non PE output file '%pB'\n"),
1047 link_info.output_bfd);
1048
1049 pe_data (link_info.output_bfd)->pe_opthdr = pep;
1050@@ -1645,7 +1645,7 @@ gld${EMULATION_NAME}_after_open (void)
1051
1052 if (!bfd_generic_link_read_symbols (is->the_bfd))
1053 {
1054- einfo (_("%F%P: %pB: could not read symbols: %E\n"),
1055+ fatal (_("%P: %pB: could not read symbols: %E\n"),
1056 is->the_bfd);
1057 return;
1058 }
1059@@ -1849,7 +1849,7 @@ gld${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIBU
1060
1061 h = bfd_link_hash_lookup (link_info.hash, buf, true, true, true);
1062 if (h == (struct bfd_link_hash_entry *) NULL)
1063- einfo (_("%F%P: bfd_link_hash_lookup failed: %E\n"));
1064+ fatal (_("%P: bfd_link_hash_lookup failed: %E\n"));
1065 if (h->type == bfd_link_hash_new)
1066 {
1067 h->type = bfd_link_hash_undefined;
1068diff --git a/ld/emultempl/ppc32elf.em b/ld/emultempl/ppc32elf.em
1069index 529a5920920..ae11bc9a072 100644
1070--- a/ld/emultempl/ppc32elf.em
1071+++ b/ld/emultempl/ppc32elf.em
1072@@ -366,7 +366,7 @@ PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LIST_ARGS_CASES}'
1073 char *end;
1074 unsigned long val = strtoul (optarg, &end, 0);
1075 if (*end || val > 5)
1076- einfo (_("%F%P: invalid --plt-align `%s'\''\n"), optarg);
1077+ fatal (_("%P: invalid --plt-align `%s'\''\n"), optarg);
1078 params.plt_stub_align = val;
1079 }
1080 else
1081@@ -399,7 +399,7 @@ PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LIST_ARGS_CASES}'
1082 if (*end
1083 || (params.pagesize < 4096 && params.pagesize != 0)
1084 || params.pagesize != (params.pagesize & -params.pagesize))
1085- einfo (_("%F%P: invalid pagesize `%s'\''\n"), optarg);
1086+ fatal (_("%P: invalid pagesize `%s'\''\n"), optarg);
1087 }
1088 break;
1089
1090diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em
1091index 1e6ae7af738..f7a8f1eb259 100644
1092--- a/ld/emultempl/ppc64elf.em
1093+++ b/ld/emultempl/ppc64elf.em
1094@@ -91,7 +91,7 @@ ppc_create_output_section_statements (void)
1095 bfd_get_arch (link_info.output_bfd),
1096 bfd_get_mach (link_info.output_bfd)))
1097 {
1098- einfo (_("%F%P: can not create BFD: %E\n"));
1099+ fatal (_("%P: can not create BFD: %E\n"));
1100 return;
1101 }
1102
1103@@ -101,7 +101,7 @@ ppc_create_output_section_statements (void)
1104 if (params.save_restore_funcs < 0)
1105 params.save_restore_funcs = !bfd_link_relocatable (&link_info);
1106 if (!ppc64_elf_init_stub_bfd (&link_info, &params))
1107- einfo (_("%F%P: can not init BFD: %E\n"));
1108+ fatal (_("%P: can not init BFD: %E\n"));
1109 }
1110
1111 /* Called after opening files but before mapping sections. */
1112@@ -825,7 +825,7 @@ PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LIST_ARGS_CASES}'
1113 const char *end;
1114 params.group_size = bfd_scan_vma (optarg, &end, 0);
1115 if (*end)
1116- einfo (_("%F%P: invalid number `%s'\''\n"), optarg);
1117+ fatal (_("%P: invalid number `%s'\''\n"), optarg);
1118 }
1119 break;
1120
1121@@ -851,7 +851,7 @@ PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LIST_ARGS_CASES}'
1122 char *end;
1123 long val = strtol (optarg, &end, 0);
1124 if (*end || (unsigned long) val + 8 > 16)
1125- einfo (_("%F%P: invalid --plt-align `%s'\''\n"), optarg);
1126+ fatal (_("%P: invalid --plt-align `%s'\''\n"), optarg);
1127 params.plt_stub_align = val;
1128 }
1129 else
1130@@ -880,7 +880,7 @@ PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LIST_ARGS_CASES}'
1131 else if (strcasecmp (optarg, "no") == 0)
1132 params.power10_stubs = 0;
1133 else
1134- einfo (_("%F%P: invalid --power10-stubs argument `%s'\''\n"),
1135+ fatal (_("%P: invalid --power10-stubs argument `%s'\''\n"),
1136 optarg);
1137 }
1138 else
1139diff --git a/ld/emultempl/riscvelf.em b/ld/emultempl/riscvelf.em
1140index 6b67c7faa72..78e1fcde68e 100644
1141--- a/ld/emultempl/riscvelf.em
1142+++ b/ld/emultempl/riscvelf.em
1143@@ -131,7 +131,7 @@ riscv_create_output_section_statements (void)
1144 These will only be created if the output format is a RISC-V format,
1145 hence we do not support linking and changing output formats at the
1146 same time. Use a link followed by objcopy to change output formats. */
1147- einfo (_("%F%P: error: cannot change output format"
1148+ fatal (_("%P: error: cannot change output format"
1149 " whilst linking %s binaries\n"), "RISC-V");
1150 return;
1151 }
1152diff --git a/ld/emultempl/s390.em b/ld/emultempl/s390.em
1153index 8548768cc5f..a2296627bad 100644
1154--- a/ld/emultempl/s390.em
1155+++ b/ld/emultempl/s390.em
1156@@ -34,7 +34,7 @@ static void
1157 s390_elf_create_output_section_statements (void)
1158 {
1159 if (!bfd_elf_s390_set_options (&link_info, &params))
1160- einfo (_("%F%P: can not init BFD: %E\n"));
1161+ fatal (_("%P: can not init BFD: %E\n"));
1162 }
1163
1164 EOF
1165diff --git a/ld/emultempl/scoreelf.em b/ld/emultempl/scoreelf.em
1166index d3a2205115b..fd67d5ceb94 100644
1167--- a/ld/emultempl/scoreelf.em
1168+++ b/ld/emultempl/scoreelf.em
1169@@ -62,7 +62,7 @@ score_elf_after_open (void)
1170 These will only be created if the output format is an score format,
1171 hence we do not support linking and changing output formats at the
1172 same time. Use a link followed by objcopy to change output formats. */
1173- einfo (_("%F%P: error: cannot change output format "
1174+ fatal (_("%P: error: cannot change output format "
1175 "whilst linking %s binaries\n"), "S+core");
1176 return;
1177 }
1178diff --git a/ld/emultempl/spuelf.em b/ld/emultempl/spuelf.em
1179index 76776ba2555..cda9a06ac08 100644
1180--- a/ld/emultempl/spuelf.em
1181+++ b/ld/emultempl/spuelf.em
1182@@ -202,7 +202,7 @@ spu_elf_load_ovl_mgr (void)
1183 /* User supplied __ovly_load. */
1184 }
1185 else if (mgr_stream->start == mgr_stream->end)
1186- einfo (_("%F%P: no built-in overlay manager\n"));
1187+ fatal (_("%P: no built-in overlay manager\n"));
1188 else
1189 {
1190 lang_input_statement_type *ovl_is;
1191@@ -379,7 +379,7 @@ spu_elf_open_overlay_script (void)
1192 if (script == NULL)
1193 {
1194 file_err:
1195- einfo (_("%F%P: can not open script: %E\n"));
1196+ fatal (_("%P: can not open script: %E\n"));
1197 }
1198 return script;
1199 }
1200@@ -695,7 +695,7 @@ PARSE_AND_LIST_ARGS_CASES='
1201 if (*end == 0)
1202 break;
1203 }
1204- einfo (_("%F%P: invalid --local-store address range `%s'\''\n"), optarg);
1205+ fatal (_("%P: invalid --local-store address range `%s'\''\n"), optarg);
1206 }
1207 break;
1208
1209@@ -731,12 +731,12 @@ PARSE_AND_LIST_ARGS_CASES='
1210 if (!num_lines_set)
1211 params.num_lines = 32;
1212 else if ((params.num_lines & -params.num_lines) != params.num_lines)
1213- einfo (_("%F%P: invalid --num-lines/--num-regions `%u'\''\n"),
1214+ fatal (_("%P: invalid --num-lines/--num-regions `%u'\''\n"),
1215 params.num_lines);
1216 if (!line_size_set)
1217 params.line_size = 1024;
1218 else if ((params.line_size & -params.line_size) != params.line_size)
1219- einfo (_("%F%P: invalid --line-size/--region-size `%u'\''\n"),
1220+ fatal (_("%P: invalid --line-size/--region-size `%u'\''\n"),
1221 params.line_size);
1222 break;
1223
1224@@ -757,7 +757,7 @@ PARSE_AND_LIST_ARGS_CASES='
1225 && (params.ovly_flavour != ovly_soft_icache
1226 || (params.num_lines & -params.num_lines) == params.num_lines))
1227 break;
1228- einfo (_("%F%P: invalid --num-lines/--num-regions `%s'\''\n"), optarg);
1229+ fatal (_("%P: invalid --num-lines/--num-regions `%s'\''\n"), optarg);
1230 }
1231 break;
1232
1233@@ -770,7 +770,7 @@ PARSE_AND_LIST_ARGS_CASES='
1234 && (params.ovly_flavour != ovly_soft_icache
1235 || (params.line_size & -params.line_size) == params.line_size))
1236 break;
1237- einfo (_("%F%P: invalid --line-size/--region-size `%s'\''\n"), optarg);
1238+ fatal (_("%P: invalid --line-size/--region-size `%s'\''\n"), optarg);
1239 }
1240 break;
1241
1242@@ -779,7 +779,7 @@ PARSE_AND_LIST_ARGS_CASES='
1243 char *end;
1244 params.auto_overlay_fixed = strtoul (optarg, &end, 0);
1245 if (*end != 0)
1246- einfo (_("%F%P: invalid --fixed-space value `%s'\''\n"), optarg);
1247+ fatal (_("%P: invalid --fixed-space value `%s'\''\n"), optarg);
1248 }
1249 break;
1250
1251@@ -788,7 +788,7 @@ PARSE_AND_LIST_ARGS_CASES='
1252 char *end;
1253 params.auto_overlay_reserved = strtoul (optarg, &end, 0);
1254 if (*end != 0)
1255- einfo (_("%F%P: invalid --reserved-space value `%s'\''\n"), optarg);
1256+ fatal (_("%P: invalid --reserved-space value `%s'\''\n"), optarg);
1257 }
1258 break;
1259
1260@@ -797,7 +797,7 @@ PARSE_AND_LIST_ARGS_CASES='
1261 char *end;
1262 params.extra_stack_space = strtol (optarg, &end, 0);
1263 if (*end != 0)
1264- einfo (_("%F%P: invalid --extra-stack-space value `%s'\''\n"), optarg);
1265+ fatal (_("%P: invalid --extra-stack-space value `%s'\''\n"), optarg);
1266 }
1267 break;
1268
1269diff --git a/ld/emultempl/tic6xdsbt.em b/ld/emultempl/tic6xdsbt.em
1270index 0680bc81112..4aec9aebe6f 100644
1271--- a/ld/emultempl/tic6xdsbt.em
1272+++ b/ld/emultempl/tic6xdsbt.em
1273@@ -59,10 +59,8 @@ tic6x_after_open (void)
1274 if (is_tic6x_target ())
1275 {
1276 if (params.dsbt_index >= params.dsbt_size)
1277- {
1278- einfo (_("%F%P: invalid --dsbt-index %d, outside DSBT size\n"),
1279- params.dsbt_index);
1280- }
1281+ fatal (_("%P: invalid --dsbt-index %d, outside DSBT size\n"),
1282+ params.dsbt_index);
1283 elf32_tic6x_setup (&link_info, &params);
1284 }
1285
1286@@ -186,7 +184,7 @@ PARSE_AND_LIST_ARGS_CASES='
1287 if (*end == 0
1288 && params.dsbt_index >= 0 && params.dsbt_index < 0x7fff)
1289 break;
1290- einfo (_("%F%P: invalid --dsbt-index %s\n"), optarg);
1291+ fatal (_("%P: invalid --dsbt-index %s\n"), optarg);
1292 }
1293 break;
1294 case OPTION_DSBT_SIZE:
1295@@ -196,7 +194,7 @@ PARSE_AND_LIST_ARGS_CASES='
1296 if (*end == 0
1297 && params.dsbt_size >= 0 && params.dsbt_size < 0x7fff)
1298 break;
1299- einfo (_("%F%P: invalid --dsbt-size %s\n"), optarg);
1300+ fatal (_("%P: invalid --dsbt-size %s\n"), optarg);
1301 }
1302 break;
1303 case OPTION_NO_MERGE_EXIDX_ENTRIES:
1304diff --git a/ld/emultempl/ticoff.em b/ld/emultempl/ticoff.em
1305index d4ef91f7af2..2e6a4a0ae6f 100644
1306--- a/ld/emultempl/ticoff.em
1307+++ b/ld/emultempl/ticoff.em
1308@@ -88,9 +88,7 @@ gld${EMULATION_NAME}_handle_option (int optc)
1309 lang_add_output_format (buf, NULL, NULL, 0);
1310 }
1311 else
1312- {
1313- einfo (_("%F%P: invalid COFF format version %s\n"), optarg);
1314- }
1315+ fatal (_("%P: invalid COFF format version %s\n"), optarg);
1316 break;
1317 }
1318 return false;
1319diff --git a/ld/emultempl/v850elf.em b/ld/emultempl/v850elf.em
1320index 84cd589a057..92a1ac4d784 100644
1321--- a/ld/emultempl/v850elf.em
1322+++ b/ld/emultempl/v850elf.em
1323@@ -63,7 +63,7 @@ v850_create_output_section_statements (void)
1324 These will only be created if the output format is an arm format,
1325 hence we do not support linking and changing output formats at the
1326 same time. Use a link followed by objcopy to change output formats. */
1327- einfo (_("%F%P: error: cannot change output format"
1328+ fatal (_("%P: error: cannot change output format"
1329 " whilst linking %s binaries\n"), "V850");
1330 return;
1331 }
1332diff --git a/ld/emultempl/vms.em b/ld/emultempl/vms.em
1333index 1b68b0db64f..5bb6ae2a430 100644
1334--- a/ld/emultempl/vms.em
1335+++ b/ld/emultempl/vms.em
1336@@ -200,7 +200,7 @@ gld${EMULATION_NAME}_before_allocation (void)
1337 if (bed->elf_backend_late_size_sections
1338 && !bed->elf_backend_late_size_sections (link_info.output_bfd,
1339 &link_info))
1340- einfo (_("%F%P: failed to set dynamic section sizes: %E\n"));
1341+ fatal (_("%P: failed to set dynamic section sizes: %E\n"));
1342
1343 before_allocation_default ();
1344 }
1345diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em
1346index e3a9b2e6cf8..027b7732d2d 100644
1347--- a/ld/emultempl/xtensaelf.em
1348+++ b/ld/emultempl/xtensaelf.em
1349@@ -390,7 +390,7 @@ check_xtensa_info (bfd *abfd, asection *info_sec)
1350
1351 data = xmalloc (info_sec->size);
1352 if (! bfd_get_section_contents (abfd, info_sec, data, 0, info_sec->size))
1353- einfo (_("%F%P: %pB: cannot read contents of section %pA\n"), abfd, info_sec);
1354+ fatal (_("%P: %pB: cannot read contents of section %pA\n"), abfd, info_sec);
1355
1356 if (info_sec->size > 24
1357 && info_sec->size >= 24 + bfd_get_32 (abfd, data + 4)
1358@@ -431,13 +431,13 @@ elf_xtensa_before_allocation (void)
1359 if (is_big_endian
1360 && link_info.output_bfd->xvec->byteorder == BFD_ENDIAN_LITTLE)
1361 {
1362- einfo (_("%F%P: little endian output does not match "
1363+ fatal (_("%P: little endian output does not match "
1364 "Xtensa configuration\n"));
1365 }
1366 if (!is_big_endian
1367 && link_info.output_bfd->xvec->byteorder == BFD_ENDIAN_BIG)
1368 {
1369- einfo (_("%F%P: big endian output does not match "
1370+ fatal (_("%P: big endian output does not match "
1371 "Xtensa configuration\n"));
1372 }
1373
1374@@ -456,7 +456,7 @@ elf_xtensa_before_allocation (void)
1375 cannot go any further if there are any mismatches. */
1376 if ((is_big_endian && f->the_bfd->xvec->byteorder == BFD_ENDIAN_LITTLE)
1377 || (!is_big_endian && f->the_bfd->xvec->byteorder == BFD_ENDIAN_BIG))
1378- einfo (_("%F%P: cross-endian linking for %pB not supported\n"),
1379+ fatal (_("%P: cross-endian linking for %pB not supported\n"),
1380 f->the_bfd);
1381
1382 if (! first_bfd)
1383@@ -487,7 +487,7 @@ elf_xtensa_before_allocation (void)
1384 info_sec = bfd_make_section_with_flags (first_bfd, ".xtensa.info",
1385 SEC_HAS_CONTENTS | SEC_READONLY);
1386 if (! info_sec)
1387- einfo (_("%F%P: failed to create .xtensa.info section\n"));
1388+ fatal (_("%P: failed to create .xtensa.info section\n"));
1389 }
1390 if (info_sec)
1391 {
1392@@ -1226,7 +1226,7 @@ ld_build_required_section_dependence (lang_statement_union_type *s)
1393 lang_statement_union_type *l = iter_stack_current (&stack);
1394
1395 if (l == NULL && link_info.non_contiguous_regions)
1396- einfo (_("%F%P: Relaxation not supported with "
1397+ fatal (_("%P: Relaxation not supported with "
1398 "--enable-non-contiguous-regions.\n"));
1399
1400 if (l->header.type == lang_input_section_enum)
1401diff --git a/ld/emultempl/z80.em b/ld/emultempl/z80.em
1402index a2a7f28aa89..d566b9ac398 100644
1403--- a/ld/emultempl/z80.em
1404+++ b/ld/emultempl/z80.em
1405@@ -48,7 +48,7 @@ z80_after_open (void)
1406 const bfd_arch_info_type *info;
1407 info = bfd_arch_get_compatible (link_info.output_bfd, abfd, false);
1408 if (info == NULL)
1409- einfo (_("%F%P: %pB: Instruction sets of object files incompatible\n"),
1410+ fatal (_("%P: %pB: Instruction sets of object files incompatible\n"),
1411 abfd);
1412 else
1413 bfd_set_arch_info (link_info.output_bfd, info);
1414diff --git a/ld/ldcref.c b/ld/ldcref.c
1415index 226d4e67adf..5d7891f6321 100644
1416--- a/ld/ldcref.c
1417+++ b/ld/ldcref.c
1418@@ -514,7 +514,7 @@ check_local_sym_xref (lang_input_statement_type *statement)
1419 return;
1420
1421 if (!bfd_generic_link_read_symbols (abfd))
1422- einfo (_("%F%P: %pB: could not read symbols: %E\n"), abfd);
1423+ fatal (_("%P: %pB: could not read symbols: %E\n"), abfd);
1424
1425 for (syms = bfd_get_outsymbols (abfd); *syms; ++syms)
1426 {
1427@@ -625,7 +625,7 @@ check_refs (const char *name,
1428 BFD might contain a prohibited cross reference. */
1429
1430 if (!bfd_generic_link_read_symbols (abfd))
1431- einfo (_("%F%P: %pB: could not read symbols: %E\n"), abfd);
1432+ fatal (_("%P: %pB: could not read symbols: %E\n"), abfd);
1433
1434 info.sym_name = name;
1435 info.global = global;
1436@@ -687,14 +687,14 @@ check_reloc_refs (bfd *abfd, asection *sec, void *iarg)
1437
1438 relsize = bfd_get_reloc_upper_bound (abfd, sec);
1439 if (relsize < 0)
1440- einfo (_("%F%P: %pB: could not read relocs: %E\n"), abfd);
1441+ fatal (_("%P: %pB: could not read relocs: %E\n"), abfd);
1442 if (relsize == 0)
1443 return;
1444
1445 relpp = (arelent **) xmalloc (relsize);
1446 relcount = bfd_canonicalize_reloc (abfd, sec, relpp, info->asymbols);
1447 if (relcount < 0)
1448- einfo (_("%F%P: %pB: could not read relocs: %E\n"), abfd);
1449+ fatal (_("%P: %pB: could not read relocs: %E\n"), abfd);
1450
1451 p = relpp;
1452 pend = p + relcount;
1453diff --git a/ld/ldelf.c b/ld/ldelf.c
1454index efa654c843c..f4f27fc3873 100644
1455--- a/ld/ldelf.c
1456+++ b/ld/ldelf.c
1457@@ -95,7 +95,7 @@ ldelf_after_parse (void)
1458 else if (!link_info.maxpagesize_is_set)
1459 link_info.maxpagesize = link_info.commonpagesize;
1460 else
1461- einfo (_("%F%P: common page size (0x%v) > maximum page size (0x%v)\n"),
1462+ fatal (_("%P: common page size (0x%v) > maximum page size (0x%v)\n"),
1463 link_info.commonpagesize, link_info.maxpagesize);
1464 }
1465 }
1466@@ -121,7 +121,7 @@ ldelf_load_symbols (lang_input_statement_type *entry)
1467
1468 if (entry->flags.just_syms
1469 && (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) != 0)
1470- einfo (_("%F%P: %pB: --just-symbols may not be used on DSO\n"),
1471+ fatal (_("%P: %pB: --just-symbols may not be used on DSO\n"),
1472 entry->the_bfd);
1473
1474 if (link_class == 0
1475@@ -321,7 +321,7 @@ ldelf_try_needed (struct dt_needed *needed, int force, int is_linux)
1476 struct bfd_link_needed_list *needs;
1477
1478 if (! bfd_elf_get_bfd_needed_list (abfd, &needs))
1479- einfo (_("%F%P: %pB: bfd_elf_get_bfd_needed_list failed: %E\n"), abfd);
1480+ fatal (_("%P: %pB: bfd_elf_get_bfd_needed_list failed: %E\n"), abfd);
1481
1482 if (needs != NULL)
1483 {
1484@@ -369,7 +369,7 @@ ldelf_try_needed (struct dt_needed *needed, int force, int is_linux)
1485 can only check that using stat. */
1486
1487 if (bfd_stat (abfd, &global_stat) != 0)
1488- einfo (_("%F%P: %pB: bfd_stat failed: %E\n"), abfd);
1489+ fatal (_("%P: %pB: bfd_stat failed: %E\n"), abfd);
1490
1491 /* First strip off everything before the last '/'. */
1492 soname = lbasename (bfd_get_filename (abfd));
1493@@ -408,7 +408,7 @@ ldelf_try_needed (struct dt_needed *needed, int force, int is_linux)
1494
1495 /* Add this file into the symbol table. */
1496 if (! bfd_link_add_symbols (abfd, &link_info))
1497- einfo (_("%F%P: %pB: error adding symbols: %E\n"), abfd);
1498+ fatal (_("%P: %pB: error adding symbols: %E\n"), abfd);
1499
1500 return true;
1501 }
1502@@ -1209,7 +1209,7 @@ ldelf_handle_dt_needed (struct elf_link_hash_table *htab,
1503 && elf_dt_name (abfd) != NULL)
1504 {
1505 if (bfd_elf_add_dt_needed_tag (abfd, &link_info) < 0)
1506- einfo (_("%F%P: failed to add DT_NEEDED dynamic tag\n"));
1507+ fatal (_("%P: failed to add DT_NEEDED dynamic tag\n"));
1508 }
1509
1510 link_info.input_bfds_tail = save_input_bfd_tail;
1511@@ -1260,10 +1260,8 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd,
1512 bfd_get_target (link_info.output_bfd));
1513
1514 if (link_info.out_implib_bfd == NULL)
1515- {
1516- einfo (_("%F%P: %s: can't open for writing: %E\n"),
1517- command_line.out_implib_filename);
1518- }
1519+ fatal (_("%P: %s: can't open for writing: %E\n"),
1520+ command_line.out_implib_filename);
1521 }
1522
1523 if (ldelf_emit_note_gnu_build_id != NULL
1524@@ -1317,7 +1315,7 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd,
1525 && (elf_tdata (abfd)->elf_header->e_type == ET_EXEC
1526 || (elf_tdata (abfd)->elf_header->e_type == ET_DYN
1527 && elf_tdata (abfd)->is_pie)))
1528- einfo (_("%F%P: cannot use executable file '%pB' as input to a link\n"),
1529+ fatal (_("%P: cannot use executable file '%pB' as input to a link\n"),
1530 abfd);
1531 }
1532
1533@@ -1371,7 +1369,7 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd,
1534 }
1535 else if (seen_type != type)
1536 {
1537- einfo (_("%F%P: compact frame descriptions incompatible with"
1538+ fatal (_("%P: compact frame descriptions incompatible with"
1539 " DWARF2 .eh_frame from %pB\n"),
1540 type == DWARF2_EH_HDR ? abfd : elfbfd);
1541 break;
1542@@ -1413,7 +1411,7 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd,
1543
1544 if (link_info.eh_frame_hdr_type == COMPACT_EH_HDR)
1545 if (!bfd_elf_parse_eh_frame_entries (NULL, &link_info))
1546- einfo (_("%F%P: failed to parse EH frame entries\n"));
1547+ fatal (_("%P: failed to parse EH frame entries\n"));
1548
1549 ldelf_handle_dt_needed (htab, use_libpath, native, is_linux,
1550 is_freebsd, elfsize, prefix);
1551@@ -1672,7 +1670,7 @@ ldelf_find_exp_assignment (etree_type *exp)
1552 &link_info,
1553 exp->assign.dst, provide,
1554 exp->assign.hidden))
1555- einfo (_("%F%P: failed to record assignment to %s: %E\n"),
1556+ fatal (_("%P: failed to record assignment to %s: %E\n"),
1557 exp->assign.dst);
1558 }
1559 ldelf_find_exp_assignment (exp->assign.src);
1560@@ -1852,7 +1850,7 @@ ldelf_before_allocation (char *audit, char *depaudit,
1561 command_line.filter_shlib, audit, depaudit,
1562 (const char * const *) command_line.auxiliary_filters,
1563 &link_info, &sinterp)))
1564- einfo (_("%F%P: failed to set dynamic section sizes: %E\n"));
1565+ fatal (_("%P: failed to set dynamic section sizes: %E\n"));
1566
1567 if (sinterp != NULL)
1568 {
1569@@ -1889,8 +1887,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
1570 msg = (char *) xmalloc ((size_t) (sz + 1));
1571 if (! bfd_get_section_contents (is->the_bfd, s, msg,
1572 (file_ptr) 0, sz))
1573- einfo (_("%F%P: %pB: can't read contents of section .gnu.warning: %E\n"),
1574- is->the_bfd);
1575+ fatal (_("%P: %pB: can't read contents of section %pA: %E\n"),
1576+ is->the_bfd, s);
1577 msg[sz] = '\0';
1578 (*link_info.callbacks->warning) (&link_info, msg,
1579 (const char *) NULL, is->the_bfd,
1580@@ -1917,7 +1915,7 @@ ldelf_before_allocation (char *audit, char *depaudit,
1581 before_allocation_default ();
1582
1583 if (!bfd_elf_size_dynsym_hash_dynstr (link_info.output_bfd, &link_info))
1584- einfo (_("%F%P: failed to set dynamic section sizes: %E\n"));
1585+ fatal (_("%P: failed to set dynamic section sizes: %E\n"));
1586
1587 if (ehdr_start != NULL)
1588 {
1589diff --git a/ld/ldelfgen.c b/ld/ldelfgen.c
1590index c649768634c..8e84b7a5b3f 100644
1591--- a/ld/ldelfgen.c
1592+++ b/ld/ldelfgen.c
1593@@ -282,7 +282,7 @@ ldelf_map_segments (bool need_layout)
1594 if (os_info->ordered != os_info->count
1595 && bfd_link_relocatable (&link_info))
1596 {
1597- einfo (_("%F%P: "
1598+ fatal (_("%P: "
1599 "%pA has both ordered and unordered sections\n"),
1600 os->bfd_section);
1601 return;
1602@@ -307,7 +307,7 @@ ldelf_map_segments (bool need_layout)
1603 if (!_bfd_elf_map_sections_to_segments (link_info.output_bfd,
1604 &link_info,
1605 &need_layout))
1606- einfo (_("%F%P: map sections to segments failed: %E\n"));
1607+ fatal (_("%P: map sections to segments failed: %E\n"));
1608
1609 if (phdr_size != elf_program_header_size (link_info.output_bfd))
1610 {
1611@@ -327,7 +327,7 @@ ldelf_map_segments (bool need_layout)
1612 while (need_layout && --tries);
1613
1614 if (tries == 0)
1615- einfo (_("%F%P: looping in map_segments\n"));
1616+ fatal (_("%P: looping in map_segments\n"));
1617
1618 if (bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour
1619 && lang_phdr_list == NULL)
1620@@ -337,9 +337,8 @@ ldelf_map_segments (bool need_layout)
1621 const struct elf_backend_data *bed
1622 = get_elf_backend_data (link_info.output_bfd);
1623 if (bed->elf_backend_strip_zero_sized_dynamic_sections
1624- && !bed->elf_backend_strip_zero_sized_dynamic_sections
1625- (&link_info))
1626- einfo (_("%F%P: failed to strip zero-sized dynamic sections\n"));
1627+ && !bed->elf_backend_strip_zero_sized_dynamic_sections (&link_info))
1628+ fatal (_("%P: failed to strip zero-sized dynamic sections\n"));
1629 }
1630 }
1631
1632@@ -417,7 +416,7 @@ ldelf_acquire_strings_for_ctf
1633 {
1634 if (ctf_link_add_strtab (ctf_output, ldelf_ctf_strtab_iter_cb,
1635 &args) < 0)
1636- einfo (_("%F%P: warning: CTF strtab association failed; strings will "
1637+ fatal (_("%P: warning: CTF strtab association failed; strings will "
1638 "not be shared: %s\n"),
1639 ctf_errmsg (ctf_errno (ctf_output)));
1640 }
1641@@ -444,7 +443,7 @@ ldelf_new_dynsym_for_ctf (struct ctf_dict *ctf_output, int symidx,
1642 lsym.st_value = sym->st_value;
1643 if (ctf_link_add_linker_symbol (ctf_output, &lsym) < 0)
1644 {
1645- einfo (_("%F%P: warning: CTF symbol addition failed; CTF will "
1646+ fatal (_("%P: warning: CTF symbol addition failed; CTF will "
1647 "not be tied to symbols: %s\n"),
1648 ctf_errmsg (ctf_errno (ctf_output)));
1649 }
1650@@ -454,7 +453,7 @@ ldelf_new_dynsym_for_ctf (struct ctf_dict *ctf_output, int symidx,
1651 /* Shuffle all the symbols. */
1652
1653 if (ctf_link_shuffle_syms (ctf_output) < 0)
1654- einfo (_("%F%P: warning: CTF symbol shuffling failed; CTF will "
1655+ fatal (_("%P: warning: CTF symbol shuffling failed; CTF will "
1656 "not be tied to symbols: %s\n"),
1657 ctf_errmsg (ctf_errno (ctf_output)));
1658 }
1659diff --git a/ld/ldemul.c b/ld/ldemul.c
1660index 0f3cb1a0125..dce0d385fe0 100644
1661--- a/ld/ldemul.c
1662+++ b/ld/ldemul.c
1663@@ -349,7 +349,7 @@ ldemul_choose_mode (char *target)
1664 einfo (_("%P: unrecognised emulation mode: %s\n"), target);
1665 einfo (_("Supported emulations: "));
1666 ldemul_list_emulations (stderr);
1667- einfo ("%F\n");
1668+ fatal ("\n");
1669 }
1670
1671 void
1672diff --git a/ld/ldexp.c b/ld/ldexp.c
1673index 87d882e5066..fd741ec7e42 100644
1674--- a/ld/ldexp.c
1675+++ b/ld/ldexp.c
1676@@ -282,7 +282,7 @@ definedness_newfunc (struct bfd_hash_entry *entry,
1677 bfd_hash_allocate (table, sizeof (struct definedness_hash_entry));
1678
1679 if (ret == NULL)
1680- einfo (_("%F%P: bfd_hash_allocate failed creating symbol %s\n"), name);
1681+ fatal (_("%P: bfd_hash_allocate failed creating symbol %s\n"), name);
1682
1683 ret->by_object = 0;
1684 ret->iteration = 0;
1685@@ -313,7 +313,7 @@ update_definedness (const char *name, struct bfd_link_hash_entry *h)
1686 bfd_hash_lookup (&definedness_table, name, true, false);
1687
1688 if (defentry == NULL)
1689- einfo (_("%F%P: bfd_hash_lookup failed creating symbol %s\n"), name);
1690+ fatal (_("%P: bfd_hash_lookup failed creating symbol %s\n"), name);
1691
1692 /* If the symbol was already defined, and not by a script, then it
1693 must be defined by an object file or by the linker target code. */
1694@@ -638,7 +638,7 @@ fold_binary (etree_type *tree)
1695 expld.result.value = ((bfd_signed_vma) lhs.value
1696 % (bfd_signed_vma) expld.result.value);
1697 else if (expld.phase != lang_mark_phase_enum)
1698- einfo (_("%F%P:%pS %% by zero\n"), tree->binary.rhs);
1699+ fatal (_("%P:%pS %% by zero\n"), tree->binary.rhs);
1700 arith_result_section (&lhs);
1701 break;
1702
1703@@ -647,7 +647,7 @@ fold_binary (etree_type *tree)
1704 expld.result.value = ((bfd_signed_vma) lhs.value
1705 / (bfd_signed_vma) expld.result.value);
1706 else if (expld.phase != lang_mark_phase_enum)
1707- einfo (_("%F%P:%pS / by zero\n"), tree->binary.rhs);
1708+ fatal (_("%P:%pS / by zero\n"), tree->binary.rhs);
1709 arith_result_section (&lhs);
1710 break;
1711
1712@@ -761,7 +761,7 @@ fold_name (etree_type *tree)
1713 if (!h)
1714 {
1715 if (expld.phase != lang_first_phase_enum)
1716- einfo (_("%F%P: bfd_link_hash_lookup failed: %E\n"));
1717+ fatal (_("%P: bfd_link_hash_lookup failed: %E\n"));
1718 }
1719 else if (h->type == bfd_link_hash_defined
1720 || h->type == bfd_link_hash_defweak)
1721@@ -789,7 +789,7 @@ fold_name (etree_type *tree)
1722 else if (expld.phase == lang_final_phase_enum
1723 || (expld.phase != lang_mark_phase_enum
1724 && expld.assigning_to_dot))
1725- einfo (_("%F%P:%pS: undefined symbol `%s'"
1726+ fatal (_("%P:%pS: undefined symbol `%s'"
1727 " referenced in expression\n"),
1728 tree, tree->name.name);
1729 else if (h->type == bfd_link_hash_new)
1730@@ -827,7 +827,7 @@ fold_name (etree_type *tree)
1731 if (os == NULL)
1732 {
1733 if (expld.phase == lang_final_phase_enum)
1734- einfo (_("%F%P:%pS: undefined section `%s'"
1735+ fatal (_("%P:%pS: undefined section `%s'"
1736 " referenced in expression\n"),
1737 tree, tree->name.name);
1738 }
1739@@ -845,7 +845,7 @@ fold_name (etree_type *tree)
1740 if (os == NULL)
1741 {
1742 if (expld.phase == lang_final_phase_enum)
1743- einfo (_("%F%P:%pS: undefined section `%s'"
1744+ fatal (_("%P:%pS: undefined section `%s'"
1745 " referenced in expression\n"),
1746 tree, tree->name.name);
1747 }
1748@@ -873,7 +873,7 @@ fold_name (etree_type *tree)
1749 if (os == NULL)
1750 {
1751 if (expld.phase == lang_final_phase_enum)
1752- einfo (_("%F%P:%pS: undefined section `%s'"
1753+ fatal (_("%P:%pS: undefined section `%s'"
1754 " referenced in expression\n"),
1755 tree, tree->name.name);
1756 new_number (0);
1757@@ -912,7 +912,7 @@ fold_name (etree_type *tree)
1758 if (mem != NULL)
1759 new_number (mem->length);
1760 else
1761- einfo (_("%F%P:%pS: undefined MEMORY region `%s'"
1762+ fatal (_("%P:%pS: undefined MEMORY region `%s'"
1763 " referenced in expression\n"),
1764 tree, tree->name.name);
1765 }
1766@@ -926,7 +926,7 @@ fold_name (etree_type *tree)
1767 if (mem != NULL)
1768 new_rel_from_abs (mem->origin);
1769 else
1770- einfo (_("%F%P:%pS: undefined MEMORY region `%s'"
1771+ fatal (_("%P:%pS: undefined MEMORY region `%s'"
1772 " referenced in expression\n"),
1773 tree, tree->name.name);
1774 }
1775@@ -938,7 +938,7 @@ fold_name (etree_type *tree)
1776 else if (strcmp (tree->name.name, "COMMONPAGESIZE") == 0)
1777 new_number (link_info.commonpagesize);
1778 else
1779- einfo (_("%F%P:%pS: unknown constant `%s' referenced in expression\n"),
1780+ fatal (_("%P:%pS: unknown constant `%s' referenced in expression\n"),
1781 tree, tree->name.name);
1782 break;
1783
1784@@ -1086,7 +1086,7 @@ exp_fold_tree_1 (etree_type *tree)
1785 if (tree->assign.dst[0] == '.' && tree->assign.dst[1] == 0)
1786 {
1787 if (tree->type.node_class != etree_assign)
1788- einfo (_("%F%P:%pS can not PROVIDE assignment to"
1789+ fatal (_("%P:%pS can not PROVIDE assignment to"
1790 " location counter\n"), tree);
1791 if (expld.phase != lang_first_phase_enum)
1792 {
1793@@ -1119,11 +1119,11 @@ exp_fold_tree_1 (etree_type *tree)
1794 || expld.section == bfd_und_section_ptr)
1795 {
1796 if (expld.phase != lang_mark_phase_enum)
1797- einfo (_("%F%P:%pS invalid assignment to"
1798+ fatal (_("%P:%pS invalid assignment to"
1799 " location counter\n"), tree);
1800 }
1801 else if (expld.dotp == NULL)
1802- einfo (_("%F%P:%pS assignment to location counter"
1803+ fatal (_("%P:%pS assignment to location counter"
1804 " invalid outside of SECTIONS\n"), tree);
1805
1806 /* After allocation, assignment to dot should not be
1807@@ -1142,7 +1142,7 @@ exp_fold_tree_1 (etree_type *tree)
1808 nextdot += expld.section->vma;
1809 if (nextdot < expld.dot
1810 && expld.section != bfd_abs_section_ptr)
1811- einfo (_("%F%P:%pS cannot move location counter backwards"
1812+ fatal (_("%P:%pS cannot move location counter backwards"
1813 " (from %V to %V)\n"),
1814 tree, expld.dot, nextdot);
1815 else
1816@@ -1202,7 +1202,7 @@ exp_fold_tree_1 (etree_type *tree)
1817 h = bfd_link_hash_lookup (link_info.hash, tree->assign.dst,
1818 true, false, true);
1819 if (h == NULL)
1820- einfo (_("%F%P:%s: hash creation failed\n"),
1821+ fatal (_("%P:%s: hash creation failed\n"),
1822 tree->assign.dst);
1823 }
1824
1825@@ -1578,7 +1578,7 @@ exp_get_vma (etree_type *tree, lang_output_section_statement_type *os,
1826 if (expld.result.valid_p)
1827 return expld.result.value;
1828 else if (name != NULL && expld.phase != lang_mark_phase_enum)
1829- einfo (_("%F%P:%pS: nonconstant expression for %s\n"),
1830+ fatal (_("%P:%pS: nonconstant expression for %s\n"),
1831 tree, name);
1832 }
1833 return def;
1834@@ -1621,7 +1621,7 @@ exp_get_fill (etree_type *tree, fill_type *def, char *name)
1835 if (!expld.result.valid_p)
1836 {
1837 if (name != NULL && expld.phase != lang_mark_phase_enum)
1838- einfo (_("%F%P:%pS: nonconstant expression for %s\n"),
1839+ fatal (_("%P:%pS: nonconstant expression for %s\n"),
1840 tree, name);
1841 return def;
1842 }
1843@@ -1681,7 +1681,7 @@ exp_get_abs_int (etree_type *tree, int def, char *name)
1844 }
1845 else if (name != NULL && expld.phase != lang_mark_phase_enum)
1846 {
1847- einfo (_("%F%P:%pS: nonconstant expression for %s\n"),
1848+ fatal (_("%P:%pS: nonconstant expression for %s\n"),
1849 tree, name);
1850 }
1851 }
1852@@ -1708,7 +1708,7 @@ ldexp_init (bool object_only)
1853 definedness_newfunc,
1854 sizeof (struct definedness_hash_entry),
1855 13))
1856- einfo (_("%F%P: can not create hash table: %E\n"));
1857+ fatal (_("%P: can not create hash table: %E\n"));
1858 }
1859
1860 /* Convert absolute symbols defined by a script from "dot" (also
1861diff --git a/ld/ldfile.c b/ld/ldfile.c
1862index 404af5fba14..75fd360d5e3 100644
1863--- a/ld/ldfile.c
1864+++ b/ld/ldfile.c
1865@@ -184,7 +184,7 @@ ldfile_add_remap_file (const char * file)
1866
1867 if (*p == '\0')
1868 {
1869- einfo ("%F%P: malformed remap file entry: %s\n", line);
1870+ fatal ("%P: malformed remap file entry: %s\n", line);
1871 continue;
1872 }
1873
1874@@ -196,7 +196,7 @@ ldfile_add_remap_file (const char * file)
1875
1876 if (*p == '\0')
1877 {
1878- einfo ("%F%P: malformed remap file entry: %s\n", line);
1879+ fatal ("%P: malformed remap file entry: %s\n", line);
1880 continue;
1881 }
1882
1883@@ -378,7 +378,7 @@ ldfile_try_open_bfd (const char *attempt,
1884 if (entry->the_bfd == NULL)
1885 {
1886 if (bfd_get_error () == bfd_error_invalid_target)
1887- einfo (_("%F%P: invalid BFD target `%s'\n"), entry->target);
1888+ fatal (_("%P: invalid BFD target `%s'\n"), entry->target);
1889 return false;
1890 }
1891
1892@@ -521,7 +521,7 @@ ldfile_try_open_bfd (const char *attempt,
1893
1894 if (!entry->flags.dynamic && (entry->the_bfd->flags & DYNAMIC) != 0)
1895 {
1896- einfo (_("%F%P: attempted static link of dynamic object `%s'\n"),
1897+ fatal (_("%P: attempted static link of dynamic object `%s'\n"),
1898 attempt);
1899 bfd_close (entry->the_bfd);
1900 entry->the_bfd = NULL;
1901@@ -927,7 +927,7 @@ ldfile_open_command_file_1 (const char *name, enum script_open_style open_how)
1902 if ((open_how != script_nonT || script->open_how != script_nonT)
1903 && strcmp (name, script->name) == 0)
1904 {
1905- einfo (_("%F%P: error: linker script file '%s'"
1906+ fatal (_("%P: error: linker script file '%s'"
1907 " appears multiple times\n"), name);
1908 return;
1909 }
1910@@ -946,7 +946,7 @@ ldfile_open_command_file_1 (const char *name, enum script_open_style open_how)
1911 if (ldlex_input_stack == NULL)
1912 {
1913 bfd_set_error (bfd_error_system_call);
1914- einfo (_("%F%P: cannot open linker script file %s: %E\n"), name);
1915+ fatal (_("%P: cannot open linker script file %s: %E\n"), name);
1916 return;
1917 }
1918
1919@@ -1040,7 +1040,7 @@ ldfile_set_output_arch (const char *string, enum bfd_architecture defarch)
1920 else if (defarch != bfd_arch_unknown)
1921 ldfile_output_architecture = defarch;
1922 else
1923- einfo (_("%F%P: cannot represent machine `%s'\n"), string);
1924+ fatal (_("%P: cannot represent machine `%s'\n"), string);
1925 }
1926
1927 /* Tidy up memory. */
1928diff --git a/ld/ldgram.y b/ld/ldgram.y
1929index 9bb98de2f0a..6635e598562 100644
1930--- a/ld/ldgram.y
1931+++ b/ld/ldgram.y
1932@@ -210,7 +210,7 @@ mri_script_command:
1933 CHIP exp
1934 | CHIP exp ',' exp
1935 | NAME {
1936- einfo(_("%F%P: unrecognised keyword in MRI style script '%s'\n"),$1);
1937+ fatal (_("%P: unrecognised keyword in MRI style script '%s'\n"), $1);
1938 }
1939 | LIST {
1940 config.map_filename = "-";
1941@@ -1581,7 +1581,7 @@ yyerror (const char *arg)
1942 einfo (_("%P:%s: file format not recognized; treating as linker script\n"),
1943 ldlex_filename ());
1944 if (error_index > 0 && error_index < ERROR_NAME_MAX)
1945- einfo (_("%F%P:%pS: %s in %s\n"), NULL, arg, error_names[error_index - 1]);
1946+ fatal (_("%P:%pS: %s in %s\n"), NULL, arg, error_names[error_index - 1]);
1947 else
1948- einfo ("%F%P:%pS: %s\n", NULL, arg);
1949+ fatal ("%P:%pS: %s\n", NULL, arg);
1950 }
1951diff --git a/ld/ldlang.c b/ld/ldlang.c
1952index 4a4acaa5493..d2c9b96bfa0 100644
1953--- a/ld/ldlang.c
1954+++ b/ld/ldlang.c
1955@@ -1352,7 +1352,7 @@ output_section_statement_table_init (void)
1956 output_section_statement_newfunc,
1957 sizeof (struct out_section_hash_entry),
1958 61))
1959- einfo (_("%F%P: can not create hash table: %E\n"));
1960+ fatal (_("%P: can not create hash table: %E\n"));
1961 }
1962
1963 static void
1964@@ -1485,7 +1485,7 @@ lang_memory_region_alias (const char *alias, const char *region_name)
1965 the default memory region. */
1966 if (strcmp (region_name, DEFAULT_MEMORY_REGION) == 0
1967 || strcmp (alias, DEFAULT_MEMORY_REGION) == 0)
1968- einfo (_("%F%P:%pS: error: alias for default memory region\n"), NULL);
1969+ fatal (_("%P:%pS: error: alias for default memory region\n"), NULL);
1970
1971 /* Look for the target region and check if the alias is not already
1972 in use. */
1973@@ -1496,14 +1496,14 @@ lang_memory_region_alias (const char *alias, const char *region_name)
1974 if (region == NULL && strcmp (n->name, region_name) == 0)
1975 region = r;
1976 if (strcmp (n->name, alias) == 0)
1977- einfo (_("%F%P:%pS: error: redefinition of memory region "
1978+ fatal (_("%P:%pS: error: redefinition of memory region "
1979 "alias `%s'\n"),
1980 NULL, alias);
1981 }
1982
1983 /* Check if the target region exists. */
1984 if (region == NULL)
1985- einfo (_("%F%P:%pS: error: memory region `%s' "
1986+ fatal (_("%P:%pS: error: memory region `%s' "
1987 "for alias `%s' does not exist\n"),
1988 NULL, region_name, alias);
1989
1990@@ -1564,7 +1564,7 @@ lang_output_section_statement_lookup (const char *name,
1991 if (entry == NULL)
1992 {
1993 if (create)
1994- einfo (_("%F%P: failed creating section `%s': %E\n"), name);
1995+ fatal (_("%P: failed creating section `%s': %E\n"), name);
1996 return NULL;
1997 }
1998
1999@@ -1607,7 +1607,7 @@ lang_output_section_statement_lookup (const char *name,
2000 name);
2001 if (entry == NULL)
2002 {
2003- einfo (_("%F%P: failed creating section `%s': %E\n"), name);
2004+ fatal (_("%P: failed creating section `%s': %E\n"), name);
2005 return NULL;
2006 }
2007 entry->root = last_ent->root;
2008@@ -2479,7 +2479,7 @@ static void
2009 init_os (lang_output_section_statement_type *s, flagword flags)
2010 {
2011 if (strcmp (s->name, DISCARD_SECTION_NAME) == 0)
2012- einfo (_("%F%P: illegal use of `%s' section\n"), DISCARD_SECTION_NAME);
2013+ fatal (_("%P: illegal use of `%s' section\n"), DISCARD_SECTION_NAME);
2014
2015 if (!s->dup_output)
2016 s->bfd_section = bfd_get_section_by_name (link_info.output_bfd, s->name);
2017@@ -2488,7 +2488,7 @@ init_os (lang_output_section_statement_type *s, flagword flags)
2018 s->name, flags);
2019 if (s->bfd_section == NULL)
2020 {
2021- einfo (_("%F%P: output format %s cannot represent section"
2022+ fatal (_("%P: output format %s cannot represent section"
2023 " called %s: %E\n"),
2024 link_info.output_bfd->xvec->name, s->name);
2025 }
2026@@ -3076,11 +3076,11 @@ load_symbols (lang_input_statement_type *entry,
2027 for (p = matching; *p != NULL; p++)
2028 einfo (" %s", *p);
2029 free (matching);
2030- einfo ("%F\n");
2031+ fatal ("\n");
2032 }
2033 else if (err != bfd_error_file_not_recognized
2034 || place == NULL)
2035- einfo (_("%F%P: %pB: file not recognized: %E\n"), entry->the_bfd);
2036+ fatal (_("%P: %pB: file not recognized: %E\n"), entry->the_bfd);
2037
2038 bfd_close (entry->the_bfd);
2039 entry->the_bfd = NULL;
2040@@ -3153,7 +3153,7 @@ load_symbols (lang_input_statement_type *entry,
2041
2042 if (!bfd_check_format (member, bfd_object))
2043 {
2044- einfo (_("%F%P: %pB: member %pB in archive is not an object\n"),
2045+ fatal (_("%P: %pB: member %pB in archive is not an object\n"),
2046 entry->the_bfd, member);
2047 loaded = false;
2048 }
2049@@ -3174,7 +3174,7 @@ load_symbols (lang_input_statement_type *entry,
2050 substitute BFD for us. */
2051 if (!bfd_link_add_symbols (subsbfd, &link_info))
2052 {
2053- einfo (_("%F%P: %pB: error adding symbols: %E\n"), member);
2054+ fatal (_("%P: %pB: error adding symbols: %E\n"), member);
2055 loaded = false;
2056 }
2057 }
2058@@ -3188,7 +3188,7 @@ load_symbols (lang_input_statement_type *entry,
2059 if (bfd_link_add_symbols (entry->the_bfd, &link_info))
2060 entry->flags.loaded = true;
2061 else
2062- einfo (_("%F%P: %pB: error adding symbols: %E\n"), entry->the_bfd);
2063+ fatal (_("%P: %pB: error adding symbols: %E\n"), entry->the_bfd);
2064
2065 return entry->flags.loaded;
2066 }
2067@@ -3429,7 +3429,7 @@ open_output (const char *name)
2068 {
2069 char *in = lrealpath (f->local_sym_name);
2070 if (filename_cmp (in, out) == 0)
2071- einfo (_("%F%P: input file '%s' is the same as output file\n"),
2072+ fatal (_("%P: input file '%s' is the same as output file\n"),
2073 f->filename);
2074 free (in);
2075 }
2076@@ -3491,23 +3491,23 @@ open_output (const char *name)
2077 if (link_info.output_bfd == NULL)
2078 {
2079 if (bfd_get_error () == bfd_error_invalid_target)
2080- einfo (_("%F%P: target %s not found\n"), output_target);
2081+ fatal (_("%P: target %s not found\n"), output_target);
2082
2083- einfo (_("%F%P: cannot open output file %s: %E\n"), name);
2084+ fatal (_("%P: cannot open output file %s: %E\n"), name);
2085 }
2086
2087 delete_output_file_on_failure = true;
2088
2089 if (!bfd_set_format (link_info.output_bfd, bfd_object))
2090- einfo (_("%F%P: %s: can not make object file: %E\n"), name);
2091+ fatal (_("%P: %s: can not make object file: %E\n"), name);
2092 if (!bfd_set_arch_mach (link_info.output_bfd,
2093- ldfile_output_architecture,
2094- ldfile_output_machine))
2095- einfo (_("%F%P: %s: can not set architecture: %E\n"), name);
2096+ ldfile_output_architecture,
2097+ ldfile_output_machine))
2098+ fatal (_("%P: %s: can not set architecture: %E\n"), name);
2099
2100 link_info.hash = bfd_link_hash_table_create (link_info.output_bfd);
2101 if (link_info.hash == NULL)
2102- einfo (_("%F%P: can not create hash table: %E\n"));
2103+ fatal (_("%P: can not create hash table: %E\n"));
2104
2105 bfd_set_gp_size (link_info.output_bfd, g_switch_value);
2106 }
2107@@ -3721,7 +3721,7 @@ open_input_bfds (lang_statement_union_type *s,
2108
2109 /* Exit if any of the files were missing. */
2110 if (input_flags.missing_file)
2111- einfo ("%F");
2112+ fatal ("");
2113 }
2114
2115 #ifdef ENABLE_LIBCTF
2116@@ -4032,7 +4032,7 @@ insert_undefined (const char *name)
2117
2118 h = bfd_link_hash_lookup (link_info.hash, name, true, false, true);
2119 if (h == NULL)
2120- einfo (_("%F%P: bfd_link_hash_lookup failed: %E\n"));
2121+ fatal (_("%P: bfd_link_hash_lookup failed: %E\n"));
2122 if (h->type == bfd_link_hash_new)
2123 {
2124 h->type = bfd_link_hash_undefined;
2125@@ -4318,7 +4318,7 @@ map_input_to_output_sections
2126 else if (strcmp (name, "SHT_PREINIT_ARRAY") == 0)
2127 type = SHT_PREINIT_ARRAY;
2128 else
2129- einfo (_ ("%F%P: invalid type for output section `%s'\n"),
2130+ fatal (_ ("%P: invalid type for output section `%s'\n"),
2131 os->name);
2132 }
2133 else
2134@@ -4327,7 +4327,7 @@ map_input_to_output_sections
2135 if (expld.result.valid_p)
2136 type = expld.result.value;
2137 else
2138- einfo (_ ("%F%P: invalid type for output section `%s'\n"),
2139+ fatal (_ ("%P: invalid type for output section `%s'\n"),
2140 os->name);
2141 }
2142 break;
2143@@ -4476,7 +4476,7 @@ process_insert_statements (lang_statement_union_type **start)
2144 }
2145 if (where == NULL)
2146 {
2147- einfo (_("%F%P: %s not found for insert\n"), i->where);
2148+ fatal (_("%P: %s not found for insert\n"), i->where);
2149 return;
2150 }
2151
2152@@ -5558,12 +5558,12 @@ size_input_section
2153 if (dot + TO_ADDR (i->size) > end)
2154 {
2155 if (i->flags & SEC_LINKER_CREATED)
2156- einfo (_("%F%P: Output section `%pA' not large enough for "
2157+ fatal (_("%P: Output section `%pA' not large enough for "
2158 "the linker-created stubs section `%pA'.\n"),
2159 i->output_section, i);
2160
2161 if (i->rawsize && i->rawsize != i->size)
2162- einfo (_("%F%P: Relaxation not supported with "
2163+ fatal (_("%P: Relaxation not supported with "
2164 "--enable-non-contiguous-regions (section `%pA' "
2165 "would overflow `%pA' after it changed size).\n"),
2166 i, i->output_section);
2167@@ -5919,7 +5919,7 @@ lang_size_sections_1
2168 dot += expld.result.section->vma;
2169 }
2170 else if (expld.phase != lang_mark_phase_enum)
2171- einfo (_("%F%P:%pS: non constant or forward reference"
2172+ fatal (_("%P:%pS: non constant or forward reference"
2173 " address expression for section %s\n"),
2174 os->addr_tree, os->name);
2175 }
2176@@ -6002,7 +6002,7 @@ lang_size_sections_1
2177 overridden by the using the --no-check-sections
2178 switch. */
2179 if (command_line.check_section_addresses)
2180- einfo (_("%F%P: error: no memory region specified"
2181+ fatal (_("%P: error: no memory region specified"
2182 " for loadable section `%s'\n"),
2183 bfd_section_name (os->bfd_section));
2184 else
2185@@ -6309,7 +6309,7 @@ lang_size_sections_1
2186 bool again;
2187
2188 if (!bfd_relax_section (i->owner, i, &link_info, &again))
2189- einfo (_("%F%P: can't relax section: %E\n"));
2190+ fatal (_("%P: can't relax section: %E\n"));
2191 if (again)
2192 *relax = true;
2193 }
2194@@ -6718,7 +6718,7 @@ lang_do_assignments_1 (lang_statement_union_type *s,
2195 s->data_statement.value += expld.result.section->vma;
2196 }
2197 else if (expld.phase == lang_final_phase_enum)
2198- einfo (_("%F%P: invalid data statement\n"));
2199+ fatal (_("%P: invalid data statement\n"));
2200 {
2201 unsigned int size;
2202 switch (s->data_statement.type)
2203@@ -6751,7 +6751,7 @@ lang_do_assignments_1 (lang_statement_union_type *s,
2204 if (expld.result.valid_p)
2205 s->reloc_statement.addend_value = expld.result.value;
2206 else if (expld.phase == lang_final_phase_enum)
2207- einfo (_("%F%P: invalid reloc statement\n"));
2208+ fatal (_("%P: invalid reloc statement\n"));
2209 dot += TO_ADDR (bfd_get_reloc_size (s->reloc_statement.howto));
2210 break;
2211
2212@@ -7169,7 +7169,7 @@ lang_end (void)
2213 break;
2214 }
2215 if (!sym)
2216- einfo (_("%F%P: --gc-sections requires a defined symbol root "
2217+ fatal (_("%P: --gc-sections requires a defined symbol root "
2218 "specified by -e or -u\n"));
2219 }
2220
2221@@ -7194,7 +7194,7 @@ lang_end (void)
2222 + bfd_section_vma (h->u.def.section->output_section)
2223 + h->u.def.section->output_offset);
2224 if (!bfd_set_start_address (link_info.output_bfd, val))
2225- einfo (_("%F%P: %s: can't set start address\n"), entry_symbol.name);
2226+ fatal (_("%P: %s: can't set start address\n"), entry_symbol.name);
2227 }
2228 else
2229 {
2230@@ -7207,7 +7207,7 @@ lang_end (void)
2231 if (*send == '\0')
2232 {
2233 if (!bfd_set_start_address (link_info.output_bfd, val))
2234- einfo (_("%F%P: can't set start address\n"));
2235+ fatal (_("%P: can't set start address\n"));
2236 }
2237 /* BZ 2004952: Only use the start of the entry section for executables. */
2238 else if bfd_link_executable (&link_info)
2239@@ -7226,7 +7226,7 @@ lang_end (void)
2240 bfd_section_vma (ts));
2241 if (!bfd_set_start_address (link_info.output_bfd,
2242 bfd_section_vma (ts)))
2243- einfo (_("%F%P: can't set start address\n"));
2244+ fatal (_("%P: can't set start address\n"));
2245 }
2246 else
2247 {
2248@@ -7295,11 +7295,10 @@ lang_check (void)
2249 != bfd_get_flavour (link_info.output_bfd)))
2250 && (bfd_get_file_flags (input_bfd) & HAS_RELOC) != 0)
2251 {
2252- einfo (_("%F%P: relocatable linking with relocations from"
2253+ fatal (_("%P: relocatable linking with relocations from"
2254 " format %s (%pB) to format %s (%pB) is not supported\n"),
2255 bfd_get_target (input_bfd), input_bfd,
2256 bfd_get_target (link_info.output_bfd), link_info.output_bfd);
2257- /* einfo with %F exits. */
2258 }
2259
2260 if (compatible == NULL)
2261@@ -7400,7 +7399,7 @@ lang_one_common (struct bfd_link_hash_entry *h, void *info)
2262
2263 section = h->u.c.p->section;
2264 if (!bfd_define_common_symbol (link_info.output_bfd, &link_info, h))
2265- einfo (_("%F%P: could not define common symbol `%pT': %E\n"),
2266+ fatal (_("%P: could not define common symbol `%pT': %E\n"),
2267 h->root.string);
2268
2269 if (config.map_file != NULL)
2270@@ -7578,7 +7577,7 @@ lang_set_flags (lang_memory_region_type *ptr, const char *flags, int invert)
2271 break;
2272
2273 default:
2274- einfo (_("%F%P: invalid character %c (%d) in flags\n"),
2275+ fatal (_("%P: invalid character %c (%d) in flags\n"),
2276 *flags, *flags);
2277 break;
2278 }
2279@@ -7672,7 +7671,7 @@ lang_enter_output_section_statement (const char *output_section_statement_name,
2280 constraint,
2281 in_section_ordering ? 0 : 2);
2282 if (os == NULL) /* && in_section_ordering */
2283- einfo (_("%F%P:%pS: error: output section '%s' must already exist\n"),
2284+ fatal (_("%P:%pS: error: output section '%s' must already exist\n"),
2285 NULL, output_section_statement_name);
2286 current_section = os;
2287
2288@@ -7696,7 +7695,7 @@ lang_enter_output_section_statement (const char *output_section_statement_name,
2289
2290 os->align_lma_with_input = align_with_input == ALIGN_WITH_INPUT;
2291 if (os->align_lma_with_input && align != NULL)
2292- einfo (_("%F%P:%pS: error: align with input and explicit align specified\n"),
2293+ fatal (_("%P:%pS: error: align with input and explicit align specified\n"),
2294 NULL);
2295
2296 os->subsection_alignment = subalign;
2297@@ -8233,7 +8232,7 @@ lang_process (void)
2298 lang_place_undefineds ();
2299
2300 if (!bfd_section_already_linked_table_init ())
2301- einfo (_("%F%P: can not create hash table: %E\n"));
2302+ fatal (_("%P: can not create hash table: %E\n"));
2303
2304 /* A first pass through the memory regions ensures that if any region
2305 references a symbol for its origin or length then this symbol will be
2306@@ -8271,7 +8270,7 @@ lang_process (void)
2307 files = file_chain;
2308 inputfiles = input_file_chain;
2309 if (plugin_call_all_symbols_read ())
2310- einfo (_("%F%P: %s: plugin reported error after all symbols read\n"),
2311+ fatal (_("%P: %s: plugin reported error after all symbols read\n"),
2312 plugin_error_plugin ());
2313 link_info.lto_all_symbols_read = true;
2314 /* Open any newly added files, updating the file chains. */
2315@@ -8508,7 +8507,7 @@ lang_process (void)
2316 assigning dynamic symbols, since removing whole input sections
2317 is hard then. */
2318 if (!bfd_merge_sections (link_info.output_bfd, &link_info))
2319- einfo (_("%F%P: bfd_merge_sections failed: %E\n"));
2320+ fatal (_("%P: bfd_merge_sections failed: %E\n"));
2321
2322 /* Look for a text section and set the readonly attribute in it. */
2323 found = bfd_get_section_by_name (link_info.output_bfd, ".text");
2324@@ -8884,9 +8883,7 @@ void
2325 lang_startup (const char *name)
2326 {
2327 if (first_file->filename != NULL)
2328- {
2329- einfo (_("%F%P: multiple STARTUP files\n"));
2330- }
2331+ fatal (_("%P: multiple STARTUP files\n"));
2332 first_file->filename = name;
2333 first_file->local_sym_name = name;
2334 first_file->flags.real = true;
2335@@ -9113,7 +9110,7 @@ lang_record_phdrs (void)
2336 break;
2337 }
2338 if (last == NULL)
2339- einfo (_("%F%P: no sections assigned to phdrs\n"));
2340+ fatal (_("%P: no sections assigned to phdrs\n"));
2341 }
2342 pl = last;
2343 }
2344@@ -9151,7 +9148,7 @@ lang_record_phdrs (void)
2345 if (!bfd_record_phdr (link_info.output_bfd, l->type,
2346 l->flags != NULL, flags, l->at != NULL,
2347 at, l->filehdr, l->phdrs, c, secs))
2348- einfo (_("%F%P: bfd_record_phdr failed: %E\n"));
2349+ fatal (_("%P: bfd_record_phdr failed: %E\n"));
2350 }
2351
2352 free (secs);
2353@@ -10441,7 +10438,7 @@ setup_section (bfd *ibfd, sec_ptr isection, void *p)
2354
2355 loser:
2356 arg->status = 1;
2357- einfo (_("%P%F: setup_section: %s: %s\n"), err, name);
2358+ fatal (_("%P: setup_section: %s: %s\n"), err, name);
2359 }
2360
2361 /* Copy the data of input section ISECTION of IBFD
2362@@ -10536,7 +10533,7 @@ copy_section (bfd *ibfd, sec_ptr isection, void *p)
2363 return;
2364
2365 loser:
2366- einfo (_("%P%F: copy_section: %s: %s\n"), err, isection->name);
2367+ fatal (_("%P: copy_section: %s: %s\n"), err, isection->name);
2368 }
2369 /* Open the temporary bfd created in the same directory as PATH. */
2370
2371@@ -10773,7 +10770,7 @@ cmdline_add_object_only_section (bfd_byte *contents, size_t size)
2372 if (!bfd_close (obfd))
2373 {
2374 unlink (ofilename);
2375- einfo (_("%P%F: failed to finish output with object-only section\n"));
2376+ fatal (_("%P: failed to finish output with object-only section\n"));
2377 }
2378
2379 /* Must be freed after bfd_close (). */
2380@@ -10783,7 +10780,7 @@ cmdline_add_object_only_section (bfd_byte *contents, size_t size)
2381 if (rename (ofilename, output_filename))
2382 {
2383 unlink (ofilename);
2384- einfo (_("%P%F: failed to rename output with object-only section\n"));
2385+ fatal (_("%P: failed to rename output with object-only section\n"));
2386 }
2387
2388 free (ofilename);
2389@@ -10799,7 +10796,7 @@ loser:
2390 unlink (ofilename);
2391 free (ofilename);
2392 }
2393- einfo (_("%P%F: failed to add object-only section: %s\n"), err);
2394+ fatal (_("%P: failed to add object-only section: %s\n"), err);
2395 }
2396
2397 /* Emit the final output with object-only section. */
2398@@ -10832,7 +10829,7 @@ cmdline_emit_object_only_section (void)
2399 ldemul_create_output_section_statements ();
2400
2401 if (!bfd_section_already_linked_table_init ())
2402- einfo (_("%P%F: Failed to create hash table\n"));
2403+ fatal (_("%P: Failed to create hash table\n"));
2404
2405 /* Call cmdline_on_object_only_archive_list_p to check which member
2406 should be loaded. */
2407@@ -10896,8 +10893,8 @@ cmdline_emit_object_only_section (void)
2408 lang_finish ();
2409
2410 if (! bfd_close (link_info.output_bfd))
2411- einfo (_("%P%F:%s: final close failed on object-only output: %E\n"),
2412- output_filename);
2413+ fatal (_("%P:%s: final close failed on object-only output: %E\n"),
2414+ output_filename);
2415
2416 link_info.output_bfd = NULL;
2417
2418@@ -10906,7 +10903,7 @@ cmdline_emit_object_only_section (void)
2419 if (fd < 0)
2420 {
2421 bfd_set_error (bfd_error_system_call);
2422- einfo (_("%P%F:%s: cannot open object-only output: %E\n"),
2423+ fatal (_("%P:%s: cannot open object-only output: %E\n"),
2424 output_filename);
2425 }
2426
2427@@ -10914,7 +10911,7 @@ cmdline_emit_object_only_section (void)
2428 if (fstat (fd, &st) != 0)
2429 {
2430 bfd_set_error (bfd_error_system_call);
2431- einfo (_("%P%F:%s: cannot stat object-only output: %E\n"),
2432+ fatal (_("%P:%s: cannot stat object-only output: %E\n"),
2433 output_filename);
2434 }
2435
2436@@ -10929,7 +10926,7 @@ cmdline_emit_object_only_section (void)
2437 if (got < 0)
2438 {
2439 bfd_set_error (bfd_error_system_call);
2440- einfo (_("%P%F:%s: read failed on object-only output: %E\n"),
2441+ fatal (_("%P:%s: read failed on object-only output: %E\n"),
2442 output_filename);
2443 }
2444
2445@@ -10956,8 +10953,7 @@ cmdline_extract_object_only_section (bfd *abfd)
2446 const char *name = bfd_extract_object_only_section (abfd);
2447
2448 if (name == NULL)
2449- einfo (_("%P%F: cannot extract object-only section from %B: %E\n"),
2450- abfd);
2451+ fatal (_("%P: cannot extract object-only section from %B: %E\n"), abfd);
2452
2453 /* It should be removed after it is done. */
2454 cmdline_list_append (&cmdline_temp_object_only_list,
2455@@ -10991,7 +10987,7 @@ cmdline_load_object_only_section (const char *name)
2456 if (bfd_link_add_symbols (entry->the_bfd, &link_info))
2457 entry->flags.loaded = true;
2458 else
2459- einfo (_("%F%P: %pB: error adding symbols: %E\n"), entry->the_bfd);
2460+ fatal (_("%P: %pB: error adding symbols: %E\n"), entry->the_bfd);
2461 }
2462
2463 /* Check and handle the object-only section. */
2464diff --git a/ld/ldlex.l b/ld/ldlex.l
2465index 58eca1b2fe7..a7bf4917642 100644
2466--- a/ld/ldlex.l
2467+++ b/ld/ldlex.l
2468@@ -506,9 +506,7 @@ void
2469 lex_push_file (FILE *file, const char *name, unsigned int sysrooted)
2470 {
2471 if (include_stack_ptr >= MAX_INCLUDE_DEPTH)
2472- {
2473- einfo (_("%F:includes nested too deeply\n"));
2474- }
2475+ fatal (_("%P: includes nested too deeply\n"));
2476 file_name_stack[include_stack_ptr] = name;
2477 lineno_stack[include_stack_ptr] = lineno;
2478 sysrooted_stack[include_stack_ptr] = input_flags.sysrooted;
2479@@ -570,9 +568,7 @@ lex_redirect (const char *string, const char *fake_filename, unsigned int count)
2480
2481 yy_init = 0;
2482 if (include_stack_ptr >= MAX_INCLUDE_DEPTH)
2483- {
2484- einfo (_("%F: macros nested too deeply\n"));
2485- }
2486+ fatal (_("%P: macros nested too deeply\n"));
2487 file_name_stack[include_stack_ptr] = fake_filename;
2488 lineno_stack[include_stack_ptr] = lineno;
2489 include_stack[include_stack_ptr] = YY_CURRENT_BUFFER;
2490@@ -676,7 +672,7 @@ yy_input (char *buf, int max_size)
2491 {
2492 result = fread (buf, 1, max_size, yyin);
2493 if (result < max_size && ferror (yyin))
2494- einfo (_("%F%P: read in flex scanner failed\n"));
2495+ fatal (_("%P: read in flex scanner failed\n"));
2496 }
2497 }
2498 return result;
2499@@ -713,7 +709,7 @@ comment (void)
2500
2501 if (c == 0)
2502 {
2503- einfo (_("%F%P: EOF in comment\n"));
2504+ fatal (_("%P: EOF in comment\n"));
2505 break;
2506 }
2507 }
2508@@ -734,7 +730,7 @@ lex_warn_invalid (char *where, char *what)
2509 if (ldfile_assumed_script)
2510 {
2511 bfd_set_error (bfd_error_file_not_recognized);
2512- einfo (_("%F%s: file not recognized: %E\n"), ldlex_filename ());
2513+ fatal (_("%s: file not recognized: %E\n"), ldlex_filename ());
2514 }
2515
2516 if (! ISPRINT (*what))
2517diff --git a/ld/ldmain.c b/ld/ldmain.c
2518index f1c5f7035c5..cb5e58d8f36 100644
2519--- a/ld/ldmain.c
2520+++ b/ld/ldmain.c
2521@@ -195,7 +195,7 @@ write_dependency_file (void)
2522 if (out == NULL)
2523 {
2524 bfd_set_error (bfd_error_system_call);
2525- einfo (_("%F%P: cannot open dependency file %s: %E\n"),
2526+ fatal (_("%P: cannot open dependency file %s: %E\n"),
2527 config.dependency_file);
2528 }
2529
2530@@ -288,7 +288,7 @@ main (int argc, char **argv)
2531 expandargv (&argc, &argv);
2532
2533 if (bfd_init () != BFD_INIT_MAGIC)
2534- einfo (_("%F%P: fatal error: libbfd ABI mismatch\n"));
2535+ fatal (_("%P: fatal error: libbfd ABI mismatch\n"));
2536
2537 bfd_set_error_program_name (program_name);
2538
2539@@ -496,14 +496,14 @@ main (int argc, char **argv)
2540 xexit (0);
2541
2542 if (link_info.inhibit_common_definition && !bfd_link_dll (&link_info))
2543- einfo (_("%F%P: --no-define-common may not be used without -shared\n"));
2544+ fatal (_("%P: --no-define-common may not be used without -shared\n"));
2545
2546 if (!lang_has_input_file)
2547 {
2548 if (version_printed || command_line.print_output_format)
2549 xexit (0);
2550 output_unknown_cmdline_warnings ();
2551- einfo (_("%F%P: no input files\n"));
2552+ fatal (_("%P: no input files\n"));
2553 }
2554
2555 if (verbose)
2556@@ -525,7 +525,7 @@ main (int argc, char **argv)
2557 if (config.map_file == (FILE *) NULL)
2558 {
2559 bfd_set_error (bfd_error_system_call);
2560- einfo (_("%F%P: cannot open map file %s: %E\n"),
2561+ einfo (_("%P: cannot open map file %s: %E\n"),
2562 config.map_filename);
2563 }
2564 }
2565@@ -600,7 +600,7 @@ main (int argc, char **argv)
2566 bfd *obfd = link_info.output_bfd;
2567 link_info.output_bfd = NULL;
2568 if (!bfd_close (obfd))
2569- einfo (_("%F%P: %s: final close failed: %E\n"), output_filename);
2570+ fatal (_("%P: %s: final close failed: %E\n"), output_filename);
2571
2572 link_info.output_bfd = NULL;
2573
2574@@ -629,10 +629,10 @@ main (int argc, char **argv)
2575 dst = fopen (dst_name, FOPEN_WB);
2576
2577 if (!src)
2578- einfo (_("%F%P: unable to open for source of copy `%s'\n"),
2579+ fatal (_("%P: unable to open for source of copy `%s'\n"),
2580 output_filename);
2581 if (!dst)
2582- einfo (_("%F%P: unable to open for destination of copy `%s'\n"),
2583+ fatal (_("%P: unable to open for destination of copy `%s'\n"),
2584 dst_name);
2585 while ((l = fread (buf, 1, bsize, src)) > 0)
2586 {
2587@@ -746,7 +746,7 @@ get_emulation (int argc, char **argv)
2588 i++;
2589 }
2590 else
2591- einfo (_("%F%P: missing argument to -m\n"));
2592+ fatal (_("%P: missing argument to -m\n"));
2593 }
2594 else if (strcmp (argv[i], "-mips1") == 0
2595 || strcmp (argv[i], "-mips2") == 0
2596@@ -800,11 +800,11 @@ add_ysym (const char *name)
2597 bfd_hash_newfunc,
2598 sizeof (struct bfd_hash_entry),
2599 61))
2600- einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
2601+ fatal (_("%P: bfd_hash_table_init failed: %E\n"));
2602 }
2603
2604 if (bfd_hash_lookup (link_info.notice_hash, name, true, true) == NULL)
2605- einfo (_("%F%P: bfd_hash_lookup failed: %E\n"));
2606+ fatal (_("%P: bfd_hash_lookup failed: %E\n"));
2607 }
2608
2609 void
2610@@ -817,11 +817,11 @@ add_ignoresym (struct bfd_link_info *info, const char *name)
2611 bfd_hash_newfunc,
2612 sizeof (struct bfd_hash_entry),
2613 61))
2614- einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
2615+ fatal (_("%P: bfd_hash_table_init failed: %E\n"));
2616 }
2617
2618 if (bfd_hash_lookup (info->ignore_hash, name, true, true) == NULL)
2619- einfo (_("%F%P: bfd_hash_lookup failed: %E\n"));
2620+ fatal (_("%P: bfd_hash_lookup failed: %E\n"));
2621 }
2622
2623 /* Record a symbol to be wrapped, from the --wrap option. */
2624@@ -837,11 +837,11 @@ add_wrap (const char *name)
2625 bfd_hash_newfunc,
2626 sizeof (struct bfd_hash_entry),
2627 61))
2628- einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
2629+ fatal (_("%P: bfd_hash_table_init failed: %E\n"));
2630 }
2631
2632 if (bfd_hash_lookup (link_info.wrap_hash, name, true, true) == NULL)
2633- einfo (_("%F%P: bfd_hash_lookup failed: %E\n"));
2634+ fatal (_("%P: bfd_hash_lookup failed: %E\n"));
2635 }
2636
2637 /* Handle the -retain-symbols-file option. */
2638@@ -869,7 +869,7 @@ add_keepsyms_file (const char *filename)
2639 xmalloc (sizeof (struct bfd_hash_table));
2640 if (!bfd_hash_table_init (link_info.keep_hash, bfd_hash_newfunc,
2641 sizeof (struct bfd_hash_entry)))
2642- einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
2643+ fatal (_("%P: bfd_hash_table_init failed: %E\n"));
2644
2645 bufsize = 100;
2646 buf = (char *) xmalloc (bufsize);
2647@@ -899,7 +899,7 @@ add_keepsyms_file (const char *filename)
2648 buf[len] = '\0';
2649
2650 if (bfd_hash_lookup (link_info.keep_hash, buf, true, true) == NULL)
2651- einfo (_("%F%P: bfd_hash_lookup for insertion failed: %E\n"));
2652+ fatal (_("%P: bfd_hash_lookup for insertion failed: %E\n"));
2653 }
2654 }
2655
2656@@ -1311,7 +1311,7 @@ constructor_callback (struct bfd_link_info *info,
2657 if (bfd_reloc_type_lookup (info->output_bfd, BFD_RELOC_CTOR) == NULL
2658 && (bfd_link_relocatable (info)
2659 || bfd_reloc_type_lookup (abfd, BFD_RELOC_CTOR) == NULL))
2660- einfo (_("%F%P: BFD backend error: BFD_RELOC_CTOR unsupported\n"));
2661+ fatal (_("%P: BFD backend error: BFD_RELOC_CTOR unsupported\n"));
2662
2663 s = set_name;
2664 if (bfd_get_symbol_leading_char (abfd) != '\0')
2665@@ -1323,7 +1323,7 @@ constructor_callback (struct bfd_link_info *info,
2666
2667 h = bfd_link_hash_lookup (info->hash, set_name, true, true, true);
2668 if (h == (struct bfd_link_hash_entry *) NULL)
2669- einfo (_("%F%P: bfd_link_hash_lookup failed: %E\n"));
2670+ fatal (_("%P: bfd_link_hash_lookup failed: %E\n"));
2671 if (h->type == bfd_link_hash_new)
2672 {
2673 h->type = bfd_link_hash_undefined;
2674@@ -1356,7 +1356,7 @@ symbol_warning (const char *warning, const char *symbol, bfd *abfd)
2675 struct warning_callback_info cinfo;
2676
2677 if (!bfd_generic_link_read_symbols (abfd))
2678- einfo (_("%F%P: %pB: could not read symbols: %E\n"), abfd);
2679+ fatal (_("%P: %pB: could not read symbols: %E\n"), abfd);
2680
2681 cinfo.found = false;
2682 cinfo.warning = warning;
2683@@ -1418,14 +1418,14 @@ warning_find_reloc (bfd *abfd, asection *sec, void *iarg)
2684
2685 relsize = bfd_get_reloc_upper_bound (abfd, sec);
2686 if (relsize < 0)
2687- einfo (_("%F%P: %pB: could not read relocs: %E\n"), abfd);
2688+ fatal (_("%P: %pB: could not read relocs: %E\n"), abfd);
2689 if (relsize == 0)
2690 return;
2691
2692 relpp = (arelent **) xmalloc (relsize);
2693 relcount = bfd_canonicalize_reloc (abfd, sec, relpp, info->asymbols);
2694 if (relcount < 0)
2695- einfo (_("%F%P: %pB: could not read relocs: %E\n"), abfd);
2696+ fatal (_("%P: %pB: could not read relocs: %E\n"), abfd);
2697
2698 p = relpp;
2699 pend = p + relcount;
2700diff --git a/ld/ldmisc.c b/ld/ldmisc.c
2701index f18a6b5c3c6..9ee0781b4de 100644
2702--- a/ld/ldmisc.c
2703+++ b/ld/ldmisc.c
2704@@ -70,7 +70,7 @@
2705 void
2706 vfinfo (FILE *fp, const char *fmt, va_list ap, bool is_warning)
2707 {
2708- bool fatal = false;
2709+ bool isfatal = false;
2710 const char *scan;
2711 int arg_type;
2712 unsigned int arg_count = 0;
2713@@ -282,7 +282,7 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bool is_warning)
2714
2715 case 'F':
2716 /* Error is fatal. */
2717- fatal = true;
2718+ isfatal = true;
2719 break;
2720
2721 case 'P':
2722@@ -324,7 +324,7 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bool is_warning)
2723 if (abfd != NULL)
2724 {
2725 if (!bfd_generic_link_read_symbols (abfd))
2726- einfo (_("%F%P: %pB: could not read symbols: %E\n"), abfd);
2727+ fatal (_("%P: %pB: could not read symbols: %E\n"), abfd);
2728
2729 asymbols = bfd_get_outsymbols (abfd);
2730 }
2731@@ -587,7 +587,7 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bool is_warning)
2732 if (is_warning && config.fatal_warnings)
2733 config.make_executable = false;
2734
2735- if (fatal)
2736+ if (isfatal)
2737 xexit (1);
2738 }
2739
2740@@ -620,6 +620,21 @@ einfo (const char *fmt, ...)
2741 fflush (stderr);
2742 }
2743
2744+/* Fatal error. */
2745+
2746+void
2747+fatal (const char *fmt, ...)
2748+{
2749+ va_list arg;
2750+
2751+ fflush (stdout);
2752+ va_start (arg, fmt);
2753+ vfinfo (stderr, fmt, arg, true);
2754+ va_end (arg);
2755+ fflush (stderr);
2756+ xexit (1);
2757+}
2758+
2759 /* The buffer size for each command-line option warning. */
2760 #define CMDLINE_WARNING_SIZE 256
2761
2762@@ -698,7 +713,7 @@ output_unknown_cmdline_warnings (void)
2763 void
2764 info_assert (const char *file, unsigned int line)
2765 {
2766- einfo (_("%F%P: internal error %s %d\n"), file, line);
2767+ fatal (_("%P: internal error %s %d\n"), file, line);
2768 }
2769
2770 /* ('m' for map) Format info message and print on map. */
2771@@ -767,8 +782,7 @@ ld_abort (const char *file, int line, const char *fn)
2772 else
2773 einfo (_("%P: internal error: aborting at %s:%d\n"),
2774 file, line);
2775- einfo (_("%F%P: please report this bug\n"));
2776- xexit (1);
2777+ fatal (_("%P: please report this bug\n"));
2778 }
2779
2780 /* Decode a hexadecimal character. Return -1 on error. */
2781diff --git a/ld/ldmisc.h b/ld/ldmisc.h
2782index cac36f01114..7103b537108 100644
2783--- a/ld/ldmisc.h
2784+++ b/ld/ldmisc.h
2785@@ -23,6 +23,7 @@
2786
2787 extern void vfinfo (FILE *fp, const char *fmt, va_list arg, bool is_warning);
2788 extern void einfo (const char *, ...);
2789+extern void fatal (const char *, ...) ATTRIBUTE_NORETURN;
2790 extern void minfo (const char *, ...);
2791 extern void info_msg (const char *, ...);
2792 extern void lfinfo (FILE *, const char *, ...);
2793diff --git a/ld/ldwrite.c b/ld/ldwrite.c
2794index b8b9ff176a4..7613def6767 100644
2795--- a/ld/ldwrite.c
2796+++ b/ld/ldwrite.c
2797@@ -57,14 +57,14 @@ build_link_order (lang_statement_union_type *statement)
2798
2799 link_order = bfd_new_link_order (link_info.output_bfd, output_section);
2800 if (link_order == NULL)
2801- einfo (_("%F%P: bfd_new_link_order failed: %E\n"));
2802+ fatal (_("%P: bfd_new_link_order failed: %E\n"));
2803
2804 link_order->type = bfd_data_link_order;
2805 link_order->offset = statement->data_statement.output_offset;
2806 link_order->u.data.contents = bfd_alloc (link_info.output_bfd,
2807 QUAD_SIZE);
2808 if (link_order->u.data.contents == NULL)
2809- einfo (_("%F%P: bfd_new_link_order failed: %E\n"));
2810+ fatal (_("%P: bfd_new_link_order failed: %E\n"));
2811
2812 value = statement->data_statement.value;
2813
2814@@ -170,7 +170,7 @@ build_link_order (lang_statement_union_type *statement)
2815
2816 link_order = bfd_new_link_order (link_info.output_bfd, output_section);
2817 if (link_order == NULL)
2818- einfo (_("%F%P: bfd_new_link_order failed: %E\n"));
2819+ fatal (_("%P: bfd_new_link_order failed: %E\n"));
2820
2821 link_order->offset = rs->output_offset;
2822 link_order->size = bfd_get_reloc_size (rs->howto);
2823@@ -178,7 +178,7 @@ build_link_order (lang_statement_union_type *statement)
2824 link_order->u.reloc.p = (struct bfd_link_order_reloc *)
2825 bfd_alloc (link_info.output_bfd, sizeof (struct bfd_link_order_reloc));
2826 if (link_order->u.reloc.p == NULL)
2827- einfo (_("%F%P: bfd_new_link_order failed: %E\n"));
2828+ fatal (_("%P: bfd_new_link_order failed: %E\n"));
2829
2830 link_order->u.reloc.p->reloc = rs->reloc;
2831 link_order->u.reloc.p->addend = rs->addend_value;
2832@@ -224,7 +224,7 @@ build_link_order (lang_statement_union_type *statement)
2833 link_order = bfd_new_link_order (link_info.output_bfd,
2834 output_section);
2835 if (link_order == NULL)
2836- einfo (_("%F%P: bfd_new_link_order failed: %E\n"));
2837+ fatal (_("%P: bfd_new_link_order failed: %E\n"));
2838
2839 if ((i->flags & SEC_NEVER_LOAD) != 0
2840 && (i->flags & SEC_DEBUGGING) == 0)
2841@@ -265,7 +265,7 @@ build_link_order (lang_statement_union_type *statement)
2842 link_order = bfd_new_link_order (link_info.output_bfd,
2843 output_section);
2844 if (link_order == NULL)
2845- einfo (_("%F%P: bfd_new_link_order failed: %E\n"));
2846+ fatal (_("%P: bfd_new_link_order failed: %E\n"));
2847 link_order->type = bfd_data_link_order;
2848 link_order->size = statement->padding_statement.size;
2849 link_order->offset = statement->padding_statement.output_offset;
2850@@ -334,8 +334,7 @@ clone_section (bfd *abfd, asection *s, const char *name, int *count)
2851 if (startswith (name, ".stab")
2852 || strcmp (name, "$GDB_SYMBOLS$") == 0)
2853 {
2854- einfo (_ ("%F%P: cannot create split section name for %s\n"), name);
2855- /* Silence gcc warnings. einfo exits, so we never reach here. */
2856+ fatal (_ ("%P: cannot create split section name for %s\n"), name);
2857 return NULL;
2858 }
2859 tname[5] = 0;
2860@@ -346,8 +345,7 @@ clone_section (bfd *abfd, asection *s, const char *name, int *count)
2861 || (h = bfd_link_hash_lookup (link_info.hash,
2862 sname, true, true, false)) == NULL)
2863 {
2864- einfo (_("%F%P: clone section failed: %E\n"));
2865- /* Silence gcc warnings. einfo exits, so we never reach here. */
2866+ fatal (_("%P: clone section failed: %E\n"));
2867 return NULL;
2868 }
2869 free (tname);
2870@@ -550,8 +548,8 @@ ldwrite (void)
2871 if (!bfd_final_link (link_info.output_bfd, &link_info))
2872 {
2873 if (bfd_get_error () != bfd_error_no_error)
2874- einfo (_("%F%P: final link failed: %E\n"));
2875+ fatal (_("%P: final link failed: %E\n"));
2876 else
2877- einfo (_("%F%P: final link failed\n"));
2878+ fatal (_("%P: final link failed\n"));
2879 }
2880 }
2881diff --git a/ld/lexsup.c b/ld/lexsup.c
2882index 58b9bdd4974..7de6e257ad0 100644
2883--- a/ld/lexsup.c
2884+++ b/ld/lexsup.c
2885@@ -818,7 +818,8 @@ parse_args (unsigned argc, char **argv)
2886 && optc != argv[last_optind][1])
2887 {
2888 if (optarg)
2889- einfo (_("%F%P: Error: unable to disambiguate: %s (did you mean -%s ?)\n"),
2890+ fatal (_("%P: Error: unable to disambiguate: "
2891+ "%s (did you mean -%s ?)\n"),
2892 argv[last_optind], argv[last_optind]);
2893 else
2894 einfo (_("%P: Warning: grouped short command line options are deprecated: %s\n"), argv[last_optind]);
2895@@ -858,7 +859,7 @@ parse_args (unsigned argc, char **argv)
2896 /* Fall through. */
2897
2898 default:
2899- einfo (_("%F%P: use the --help option for usage information\n"));
2900+ fatal (_("%P: use the --help option for usage information\n"));
2901 break;
2902
2903 case 1: /* File name. */
2904@@ -877,7 +878,7 @@ parse_args (unsigned argc, char **argv)
2905 || strcmp (optarg, "default") == 0)
2906 input_flags.dynamic = true;
2907 else
2908- einfo (_("%F%P: unrecognized -a option `%s'\n"), optarg);
2909+ fatal (_("%P: unrecognized -a option `%s'\n"), optarg);
2910 break;
2911 case OPTION_ASSERT:
2912 /* FIXME: We just ignore these, but we should handle them. */
2913@@ -890,7 +891,7 @@ parse_args (unsigned argc, char **argv)
2914 else if (strcmp (optarg, "pure-text") == 0)
2915 ;
2916 else
2917- einfo (_("%F%P: unrecognized -assert option `%s'\n"), optarg);
2918+ fatal (_("%P: unrecognized -assert option `%s'\n"), optarg);
2919 break;
2920 case 'A':
2921 ldfile_add_arch (optarg);
2922@@ -934,8 +935,7 @@ parse_args (unsigned argc, char **argv)
2923
2924 style = cplus_demangle_name_to_style (optarg);
2925 if (style == unknown_demangling)
2926- einfo (_("%F%P: unknown demangling style `%s'\n"),
2927- optarg);
2928+ fatal (_("%P: unknown demangling style `%s'\n"), optarg);
2929
2930 cplus_demangle_set_style (style);
2931 }
2932@@ -1042,7 +1042,7 @@ parse_args (unsigned argc, char **argv)
2933 char *end;
2934 g_switch_value = strtoul (optarg, &end, 0);
2935 if (*end)
2936- einfo (_("%F%P: invalid number `%s'\n"), optarg);
2937+ fatal (_("%P: invalid number `%s'\n"), optarg);
2938 }
2939 break;
2940 case 'g':
2941@@ -1138,7 +1138,7 @@ parse_args (unsigned argc, char **argv)
2942 link_info.unresolved_syms_in_shared_libs = RM_IGNORE;
2943 }
2944 else
2945- einfo (_("%F%P: bad --unresolved-symbols option: %s\n"), optarg);
2946+ fatal (_("%P: bad --unresolved-symbols option: %s\n"), optarg);
2947 break;
2948 case OPTION_WARN_UNRESOLVED_SYMBOLS:
2949 link_info.warn_unresolved_syms = true;
2950@@ -1225,7 +1225,7 @@ parse_args (unsigned argc, char **argv)
2951 break;
2952 case OPTION_PLUGIN_OPT:
2953 if (plugin_opt_plugin_arg (optarg))
2954- einfo (_("%F%P: bad -plugin-opt option\n"));
2955+ fatal (_("%P: bad -plugin-opt option\n"));
2956 break;
2957 case OPTION_PLUGIN_SAVE_TEMPS:
2958 config.plugin_save_temps = true;
2959@@ -1245,11 +1245,11 @@ parse_args (unsigned argc, char **argv)
2960 an error message here. We cannot just make this a warning,
2961 increment optind, and continue because getopt is too confused
2962 and will seg-fault the next time around. */
2963- einfo(_("%F%P: unrecognised option: %s\n"), argv[optind]);
2964+ fatal(_("%P: unrecognised option: %s\n"), argv[optind]);
2965
2966 if (bfd_link_pic (&link_info))
2967- einfo (_("%F%P: -r and %s may not be used together\n"),
2968- bfd_link_dll (&link_info) ? "-shared" : "-pie");
2969+ fatal (_("%P: -r and %s may not be used together\n"),
2970+ bfd_link_dll (&link_info) ? "-shared" : "-pie");
2971
2972 link_info.type = type_relocatable;
2973 config.build_constructors = false;
2974@@ -1358,7 +1358,7 @@ parse_args (unsigned argc, char **argv)
2975 if (config.has_shared)
2976 {
2977 if (bfd_link_relocatable (&link_info))
2978- einfo (_("%F%P: -r and %s may not be used together\n"),
2979+ fatal (_("%P: -r and %s may not be used together\n"),
2980 "-shared");
2981
2982 link_info.type = type_dll;
2983@@ -1370,7 +1370,7 @@ parse_args (unsigned argc, char **argv)
2984 link_info.unresolved_syms_in_shared_libs = RM_IGNORE;
2985 }
2986 else
2987- einfo (_("%F%P: -shared not supported\n"));
2988+ fatal (_("%P: -shared not supported\n"));
2989 break;
2990 case OPTION_NO_PIE:
2991 link_info.type = type_pde;
2992@@ -1379,12 +1379,12 @@ parse_args (unsigned argc, char **argv)
2993 if (config.has_shared)
2994 {
2995 if (bfd_link_relocatable (&link_info))
2996- einfo (_("%F%P: -r and %s may not be used together\n"), "-pie");
2997+ fatal (_("%P: -r and %s may not be used together\n"), "-pie");
2998
2999 link_info.type = type_pie;
3000 }
3001 else
3002- einfo (_("%F%P: -pie not supported\n"));
3003+ fatal (_("%P: -pie not supported\n"));
3004 break;
3005 case 'h': /* Used on Solaris. */
3006 case OPTION_SONAME:
3007@@ -1401,7 +1401,7 @@ parse_args (unsigned argc, char **argv)
3008 else if (strcmp (optarg, N_("ascending")) == 0)
3009 config.sort_common = sort_ascending;
3010 else
3011- einfo (_("%F%P: invalid common section sorting option: %s\n"),
3012+ fatal (_("%P: invalid common section sorting option: %s\n"),
3013 optarg);
3014 break;
3015 case OPTION_SORT_SECTION:
3016@@ -1410,8 +1410,7 @@ parse_args (unsigned argc, char **argv)
3017 else if (strcmp (optarg, N_("alignment")) == 0)
3018 sort_section = by_alignment;
3019 else
3020- einfo (_("%F%P: invalid section sorting option: %s\n"),
3021- optarg);
3022+ fatal (_("%P: invalid section sorting option: %s\n"), optarg);
3023 break;
3024 case OPTION_SECTION_ORDERING_FILE:
3025 if (command_line.section_ordering_file != NULL
3026@@ -1453,14 +1452,14 @@ parse_args (unsigned argc, char **argv)
3027 /* Check for <something>=<somthing>... */
3028 optarg2 = strchr (optarg, '=');
3029 if (optarg2 == NULL)
3030- einfo (_("%F%P: invalid argument to option"
3031+ fatal (_("%P: invalid argument to option"
3032 " \"--section-start\"\n"));
3033
3034 optarg2++;
3035
3036 /* So far so good. Are all the args present? */
3037 if ((*optarg == '\0') || (*optarg2 == '\0'))
3038- einfo (_("%F%P: missing argument(s) to option"
3039+ fatal (_("%P: missing argument(s) to option"
3040 " \"--section-start\"\n"));
3041
3042 /* We must copy the section name as set_section_start
3043@@ -1507,8 +1506,8 @@ parse_args (unsigned argc, char **argv)
3044 /* Fall through. */
3045 case OPTION_UR:
3046 if (bfd_link_pic (&link_info))
3047- einfo (_("%F%P: -r and %s may not be used together\n"),
3048- bfd_link_dll (&link_info) ? "-shared" : "-pie");
3049+ fatal (_("%P: -r and %s may not be used together\n"),
3050+ bfd_link_dll (&link_info) ? "-shared" : "-pie");
3051
3052 link_info.type = type_relocatable;
3053 config.build_constructors = true;
3054@@ -1538,7 +1537,7 @@ parse_args (unsigned argc, char **argv)
3055 char *end;
3056 int level ATTRIBUTE_UNUSED = strtoul (optarg, &end, 0);
3057 if (*end)
3058- einfo (_("%F%P: invalid number `%s'\n"), optarg);
3059+ fatal (_("%P: invalid number `%s'\n"), optarg);
3060 #if BFD_SUPPORTS_PLUGINS
3061 report_plugin_symbols = level > 1;
3062 #endif /* BFD_SUPPORTS_PLUGINS */
3063@@ -1733,7 +1732,7 @@ parse_args (unsigned argc, char **argv)
3064 break;
3065 case ')':
3066 if (! ingroup)
3067- einfo (_("%F%P: group ended before it began (--help for usage)\n"));
3068+ fatal (_("%P: group ended before it began (--help for usage)\n"));
3069
3070 lang_leave_group ();
3071 ingroup--;
3072@@ -1749,7 +1748,7 @@ parse_args (unsigned argc, char **argv)
3073
3074 case OPTION_REMAP_INPUTS_FILE:
3075 if (! ldfile_add_remap_file (optarg))
3076- einfo (_("%F%P: failed to add remap file %s\n"), optarg);
3077+ fatal (_("%P: failed to add remap file %s\n"), optarg);
3078 break;
3079
3080 case OPTION_REMAP_INPUTS:
3081@@ -1758,7 +1757,7 @@ parse_args (unsigned argc, char **argv)
3082 if (optarg2 == NULL)
3083 /* FIXME: Should we allow --remap-inputs=@myfile as a synonym
3084 for --remap-inputs-file=myfile ? */
3085- einfo (_("%F%P: invalid argument to option --remap-inputs\n"));
3086+ fatal (_("%P: invalid argument to option --remap-inputs\n"));
3087 size_t len = optarg2 - optarg;
3088 char * pattern = xmalloc (len + 1);
3089 memcpy (pattern, optarg, len);
3090@@ -1779,8 +1778,7 @@ parse_args (unsigned argc, char **argv)
3091 char *end;
3092 bfd_size_type cache_size = strtoul (optarg, &end, 0);
3093 if (*end != '\0')
3094- einfo (_("%F%P: invalid cache memory size: %s\n"),
3095- optarg);
3096+ fatal (_("%P: invalid cache memory size: %s\n"), optarg);
3097 link_info.max_cache_size = cache_size;
3098 }
3099 break;
3100@@ -1805,7 +1803,7 @@ parse_args (unsigned argc, char **argv)
3101
3102 case OPTION_POP_STATE:
3103 if (input_flags.pushed == NULL)
3104- einfo (_("%F%P: no state pushed before popping\n"));
3105+ fatal (_("%P: no state pushed before popping\n"));
3106 else
3107 {
3108 struct lang_input_statement_flags *oldp = input_flags.pushed;
3109@@ -1828,7 +1826,7 @@ parse_args (unsigned argc, char **argv)
3110 else if (strcasecmp (optarg, "discard") == 0)
3111 config.orphan_handling = orphan_handling_discard;
3112 else
3113- einfo (_("%F%P: invalid argument to option"
3114+ fatal (_("%P: invalid argument to option"
3115 " \"--orphan-handling\"\n"));
3116 break;
3117
3118@@ -1873,7 +1871,7 @@ parse_args (unsigned argc, char **argv)
3119 else if (strcmp (optarg, "share-duplicated") == 0)
3120 config.ctf_share_duplicated = true;
3121 else
3122- einfo (_("%F%P: bad --ctf-share-types option: %s\n"), optarg);
3123+ fatal (_("%P: bad --ctf-share-types option: %s\n"), optarg);
3124 break;
3125 }
3126 }
3127@@ -2059,7 +2057,7 @@ parse_args (unsigned argc, char **argv)
3128 if (config.no_section_header)
3129 {
3130 if (bfd_link_relocatable (&link_info))
3131- einfo (_("%F%P: -r and -z nosectionheader may not be used together\n"));
3132+ fatal (_("%P: -r and -z nosectionheader may not be used together\n"));
3133
3134 link_info.strip = strip_all;
3135 }
3136@@ -2067,9 +2065,9 @@ parse_args (unsigned argc, char **argv)
3137 if (!bfd_link_dll (&link_info))
3138 {
3139 if (command_line.filter_shlib)
3140- einfo (_("%F%P: -F may not be used without -shared\n"));
3141+ fatal (_("%P: -F may not be used without -shared\n"));
3142 if (command_line.auxiliary_filters)
3143- einfo (_("%F%P: -f may not be used without -shared\n"));
3144+ fatal (_("%P: -f may not be used without -shared\n"));
3145 }
3146
3147 /* Treat ld -r -s as ld -r -S -x (i.e., strip all local symbols). I
3148@@ -2110,7 +2108,7 @@ set_section_start (char *sect, char *valstr)
3149 const char *end;
3150 bfd_vma val = bfd_scan_vma (valstr, &end, 16);
3151 if (*end)
3152- einfo (_("%F%P: invalid hex number `%s'\n"), valstr);
3153+ fatal (_("%P: invalid hex number `%s'\n"), valstr);
3154 lang_section_start (sect, exp_intop (val), NULL);
3155 }
3156
3157@@ -2123,7 +2121,7 @@ set_segment_start (const char *section, char *valstr)
3158
3159 bfd_vma val = bfd_scan_vma (valstr, &end, 16);
3160 if (*end)
3161- einfo (_("%F%P: invalid hex number `%s'\n"), valstr);
3162+ fatal (_("%P: invalid hex number `%s'\n"), valstr);
3163 /* If we already have an entry for this segment, update the existing
3164 value. */
3165 name = section + 1;
3166diff --git a/ld/mri.c b/ld/mri.c
3167index 68c024a83e4..586d23d2743 100644
3168--- a/ld/mri.c
3169+++ b/ld/mri.c
3170@@ -288,7 +288,7 @@ mri_format (const char *name)
3171 lang_add_output_format ("srec", NULL, NULL, 1);
3172
3173 else
3174- einfo (_("%F%P: unknown format type %s\n"), name);
3175+ fatal (_("%P: unknown format type %s\n"), name);
3176 }
3177
3178 void
3179diff --git a/ld/pe-dll.c b/ld/pe-dll.c
3180index f24b8716ae2..4e72f1b8d8d 100644
3181--- a/ld/pe-dll.c
3182+++ b/ld/pe-dll.c
3183@@ -777,7 +777,7 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
3184
3185 if (!bfd_generic_link_read_symbols (b))
3186 {
3187- einfo (_("%F%P: %pB: could not read symbols: %E\n"), b);
3188+ fatal (_("%P: %pB: could not read symbols: %E\n"), b);
3189 return;
3190 }
3191
3192@@ -1069,7 +1069,7 @@ build_filler_bfd (bool include_edata)
3193 bfd_get_arch (link_info.output_bfd),
3194 bfd_get_mach (link_info.output_bfd)))
3195 {
3196- einfo (_("%F%P: can not create BFD: %E\n"));
3197+ fatal (_("%P: can not create BFD: %E\n"));
3198 return;
3199 }
3200
3201@@ -1347,7 +1347,7 @@ pe_walk_relocs (struct bfd_link_info *info,
3202
3203 if (!bfd_generic_link_read_symbols (b))
3204 {
3205- einfo (_("%F%P: %pB: could not read symbols: %E\n"), b);
3206+ fatal (_("%P: %pB: could not read symbols: %E\n"), b);
3207 return;
3208 }
3209
3210@@ -1428,7 +1428,7 @@ pe_find_data_imports (const char *symhead,
3211 if (!bfd_hash_table_init (import_hash,
3212 bfd_hash_newfunc,
3213 sizeof (struct bfd_hash_entry)))
3214- einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
3215+ fatal (_("%P: bfd_hash_table_init failed: %E\n"));
3216 }
3217 else
3218 import_hash = NULL;
3219@@ -1468,7 +1468,7 @@ pe_find_data_imports (const char *symhead,
3220
3221 if (!bfd_generic_link_read_symbols (b))
3222 {
3223- einfo (_("%F%P: %pB: could not read symbols: %E\n"), b);
3224+ fatal (_("%P: %pB: could not read symbols: %E\n"), b);
3225 return;
3226 }
3227
3228@@ -1570,7 +1570,7 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
3229
3230 if (!bfd_generic_link_read_symbols (b))
3231 {
3232- einfo (_("%F%P: %pB: could not read symbols: %E\n"), b);
3233+ fatal (_("%P: %pB: could not read symbols: %E\n"), b);
3234 return;
3235 }
3236
3237diff --git a/ld/plugin.c b/ld/plugin.c
3238index 8aec84852c0..dedd1a08b30 100644
3239--- a/ld/plugin.c
3240+++ b/ld/plugin.c
3241@@ -252,7 +252,7 @@ plugin_opt_plugin (const char *plugin)
3242 newplug->name = plugin;
3243 newplug->dlhandle = dlopen (plugin, RTLD_NOW);
3244 if (!newplug->dlhandle)
3245- einfo (_("%F%P: %s: error loading plugin: %s\n"), plugin, dlerror ());
3246+ fatal (_("%P: %s: error loading plugin: %s\n"), plugin, dlerror ());
3247
3248 /* Check if plugin has been loaded already. */
3249 while (curplug)
3250@@ -343,7 +343,7 @@ plugin_get_ir_dummy_bfd (const char *name, bfd *srctemplate)
3251 }
3252 }
3253 report_error:
3254- einfo (_("%F%P: could not create dummy IR bfd: %E\n"));
3255+ fatal (_("%P: could not create dummy IR bfd: %E\n"));
3256 return NULL;
3257 }
3258
3259@@ -424,7 +424,7 @@ asymbol_from_plugin_symbol (bfd *abfd, asymbol *asym,
3260 unsigned char visibility;
3261
3262 if (!elfsym)
3263- einfo (_("%F%P: %s: non-ELF symbol in ELF BFD!\n"), asym->name);
3264+ fatal (_("%P: %s: non-ELF symbol in ELF BFD!\n"), asym->name);
3265
3266 if (ldsym->def == LDPK_COMMON)
3267 {
3268@@ -435,7 +435,7 @@ asymbol_from_plugin_symbol (bfd *abfd, asymbol *asym,
3269 switch (ldsym->visibility)
3270 {
3271 default:
3272- einfo (_("%F%P: unknown ELF symbol visibility: %d!\n"),
3273+ fatal (_("%P: unknown ELF symbol visibility: %d!\n"),
3274 ldsym->visibility);
3275 return LDPS_ERR;
3276
3277@@ -557,7 +557,7 @@ get_view (const void *handle, const void **viewp)
3278
3279 /* FIXME: einfo should support %lld. */
3280 if ((off_t) size != input->filesize)
3281- einfo (_("%F%P: unsupported input file size: %s (%ld bytes)\n"),
3282+ fatal (_("%P: unsupported input file size: %s (%ld bytes)\n"),
3283 input->name, (long) input->filesize);
3284
3285 /* Check the cached view buffer. */
3286@@ -833,7 +833,7 @@ get_symbols (const void *handle, int nsyms, struct ld_plugin_symbol *syms,
3287 && blhe->type != bfd_link_hash_common)
3288 {
3289 /* We should not have a new, indirect or warning symbol here. */
3290- einfo (_("%F%P: %s: plugin symbol table corrupt (sym type %d)\n"),
3291+ fatal (_("%P: %s: plugin symbol table corrupt (sym type %d)\n"),
3292 called_plugin->name, blhe->type);
3293 }
3294
3295@@ -985,13 +985,14 @@ message (int level, const char *format, ...)
3296 case LDPL_ERROR:
3297 default:
3298 {
3299- char *newfmt = concat (level == LDPL_FATAL ? "%F" : "%X",
3300- _("%P: error: "), format, "\n",
3301+ char *newfmt = concat (_("%X%P: error: "), format, "\n",
3302 (const char *) NULL);
3303 fflush (stdout);
3304 vfinfo (stderr, newfmt, args, true);
3305 fflush (stderr);
3306 free (newfmt);
3307+ if (level == LDPL_FATAL)
3308+ fatal ("");
3309 }
3310 break;
3311 }
3312@@ -1134,14 +1135,14 @@ plugin_load_plugins (void)
3313 if (!onloadfn)
3314 onloadfn = (ld_plugin_onload) dlsym (curplug->dlhandle, "_onload");
3315 if (!onloadfn)
3316- einfo (_("%F%P: %s: error loading plugin: %s\n"),
3317+ fatal (_("%P: %s: error loading plugin: %s\n"),
3318 curplug->name, dlerror ());
3319 set_tv_plugin_args (curplug, &my_tv[tv_header_size]);
3320 called_plugin = curplug;
3321 rv = (*onloadfn) (my_tv);
3322 called_plugin = NULL;
3323 if (rv != LDPS_OK)
3324- einfo (_("%F%P: %s: plugin error: %d\n"), curplug->name, rv);
3325+ fatal (_("%P: %s: plugin error: %d\n"), curplug->name, rv);
3326 curplug = curplug->next;
3327 }
3328
3329@@ -1205,7 +1206,7 @@ plugin_strdup (bfd *abfd, const char *str)
3330 strlength = strlen (str) + 1;
3331 copy = bfd_alloc (abfd, strlength);
3332 if (copy == NULL)
3333- einfo (_("%F%P: plugin_strdup failed to allocate memory: %s\n"),
3334+ fatal (_("%P: plugin_strdup failed to allocate memory: %s\n"),
3335 bfd_get_error ());
3336 memcpy (copy, str, strlength);
3337 return copy;
3338@@ -1247,7 +1248,7 @@ plugin_object_p (bfd *ibfd, bool known_used)
3339
3340 input = bfd_alloc (abfd, sizeof (*input));
3341 if (input == NULL)
3342- einfo (_("%F%P: plugin failed to allocate memory for input: %s\n"),
3343+ fatal (_("%P: plugin failed to allocate memory for input: %s\n"),
3344 bfd_get_error ());
3345
3346 if (!bfd_plugin_open_input (ibfd, &file))
3347@@ -1276,7 +1277,7 @@ plugin_object_p (bfd *ibfd, bool known_used)
3348
3349 if (plugin_call_claim_file (&file, &claimed, &claim_file_handler_v2,
3350 known_used))
3351- einfo (_("%F%P: %s: plugin reported error claiming file\n"),
3352+ fatal (_("%P: %s: plugin reported error claiming file\n"),
3353 plugin_error_plugin ());
3354
3355 if (input->fd != -1