aboutsummaryrefslogtreecommitdiff
path: root/ld/lexsup.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r--ld/lexsup.c72
1 files changed, 35 insertions, 37 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 58b9bdd..7de6e25 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -810,7 +810,8 @@ parse_args (unsigned argc, char **argv)
&& optc != argv[last_optind][1])
{
if (optarg)
- einfo (_("%F%P: Error: unable to disambiguate: %s (did you mean -%s ?)\n"),
+ fatal (_("%P: Error: unable to disambiguate: "
+ "%s (did you mean -%s ?)\n"),
argv[last_optind], argv[last_optind]);
else
einfo (_("%P: Warning: grouped short command line options are deprecated: %s\n"), argv[last_optind]);
@@ -850,7 +851,7 @@ parse_args (unsigned argc, char **argv)
/* Fall through. */
default:
- einfo (_("%F%P: use the --help option for usage information\n"));
+ fatal (_("%P: use the --help option for usage information\n"));
break;
case 1: /* File name. */
@@ -869,7 +870,7 @@ parse_args (unsigned argc, char **argv)
|| strcmp (optarg, "default") == 0)
input_flags.dynamic = true;
else
- einfo (_("%F%P: unrecognized -a option `%s'\n"), optarg);
+ fatal (_("%P: unrecognized -a option `%s'\n"), optarg);
break;
case OPTION_ASSERT:
/* FIXME: We just ignore these, but we should handle them. */
@@ -882,7 +883,7 @@ parse_args (unsigned argc, char **argv)
else if (strcmp (optarg, "pure-text") == 0)
;
else
- einfo (_("%F%P: unrecognized -assert option `%s'\n"), optarg);
+ fatal (_("%P: unrecognized -assert option `%s'\n"), optarg);
break;
case 'A':
ldfile_add_arch (optarg);
@@ -926,8 +927,7 @@ parse_args (unsigned argc, char **argv)
style = cplus_demangle_name_to_style (optarg);
if (style == unknown_demangling)
- einfo (_("%F%P: unknown demangling style `%s'\n"),
- optarg);
+ fatal (_("%P: unknown demangling style `%s'\n"), optarg);
cplus_demangle_set_style (style);
}
@@ -1034,7 +1034,7 @@ parse_args (unsigned argc, char **argv)
char *end;
g_switch_value = strtoul (optarg, &end, 0);
if (*end)
- einfo (_("%F%P: invalid number `%s'\n"), optarg);
+ fatal (_("%P: invalid number `%s'\n"), optarg);
}
break;
case 'g':
@@ -1130,7 +1130,7 @@ parse_args (unsigned argc, char **argv)
link_info.unresolved_syms_in_shared_libs = RM_IGNORE;
}
else
- einfo (_("%F%P: bad --unresolved-symbols option: %s\n"), optarg);
+ fatal (_("%P: bad --unresolved-symbols option: %s\n"), optarg);
break;
case OPTION_WARN_UNRESOLVED_SYMBOLS:
link_info.warn_unresolved_syms = true;
@@ -1217,7 +1217,7 @@ parse_args (unsigned argc, char **argv)
break;
case OPTION_PLUGIN_OPT:
if (plugin_opt_plugin_arg (optarg))
- einfo (_("%F%P: bad -plugin-opt option\n"));
+ fatal (_("%P: bad -plugin-opt option\n"));
break;
case OPTION_PLUGIN_SAVE_TEMPS:
config.plugin_save_temps = true;
@@ -1237,11 +1237,11 @@ parse_args (unsigned argc, char **argv)
an error message here. We cannot just make this a warning,
increment optind, and continue because getopt is too confused
and will seg-fault the next time around. */
- einfo(_("%F%P: unrecognised option: %s\n"), argv[optind]);
+ fatal(_("%P: unrecognised option: %s\n"), argv[optind]);
if (bfd_link_pic (&link_info))
- einfo (_("%F%P: -r and %s may not be used together\n"),
- bfd_link_dll (&link_info) ? "-shared" : "-pie");
+ fatal (_("%P: -r and %s may not be used together\n"),
+ bfd_link_dll (&link_info) ? "-shared" : "-pie");
link_info.type = type_relocatable;
config.build_constructors = false;
@@ -1350,7 +1350,7 @@ parse_args (unsigned argc, char **argv)
if (config.has_shared)
{
if (bfd_link_relocatable (&link_info))
- einfo (_("%F%P: -r and %s may not be used together\n"),
+ fatal (_("%P: -r and %s may not be used together\n"),
"-shared");
link_info.type = type_dll;
@@ -1362,7 +1362,7 @@ parse_args (unsigned argc, char **argv)
link_info.unresolved_syms_in_shared_libs = RM_IGNORE;
}
else
- einfo (_("%F%P: -shared not supported\n"));
+ fatal (_("%P: -shared not supported\n"));
break;
case OPTION_NO_PIE:
link_info.type = type_pde;
@@ -1371,12 +1371,12 @@ parse_args (unsigned argc, char **argv)
if (config.has_shared)
{
if (bfd_link_relocatable (&link_info))
- einfo (_("%F%P: -r and %s may not be used together\n"), "-pie");
+ fatal (_("%P: -r and %s may not be used together\n"), "-pie");
link_info.type = type_pie;
}
else
- einfo (_("%F%P: -pie not supported\n"));
+ fatal (_("%P: -pie not supported\n"));
break;
case 'h': /* Used on Solaris. */
case OPTION_SONAME:
@@ -1393,7 +1393,7 @@ parse_args (unsigned argc, char **argv)
else if (strcmp (optarg, N_("ascending")) == 0)
config.sort_common = sort_ascending;
else
- einfo (_("%F%P: invalid common section sorting option: %s\n"),
+ fatal (_("%P: invalid common section sorting option: %s\n"),
optarg);
break;
case OPTION_SORT_SECTION:
@@ -1402,8 +1402,7 @@ parse_args (unsigned argc, char **argv)
else if (strcmp (optarg, N_("alignment")) == 0)
sort_section = by_alignment;
else
- einfo (_("%F%P: invalid section sorting option: %s\n"),
- optarg);
+ fatal (_("%P: invalid section sorting option: %s\n"), optarg);
break;
case OPTION_SECTION_ORDERING_FILE:
if (command_line.section_ordering_file != NULL
@@ -1445,14 +1444,14 @@ parse_args (unsigned argc, char **argv)
/* Check for <something>=<somthing>... */
optarg2 = strchr (optarg, '=');
if (optarg2 == NULL)
- einfo (_("%F%P: invalid argument to option"
+ fatal (_("%P: invalid argument to option"
" \"--section-start\"\n"));
optarg2++;
/* So far so good. Are all the args present? */
if ((*optarg == '\0') || (*optarg2 == '\0'))
- einfo (_("%F%P: missing argument(s) to option"
+ fatal (_("%P: missing argument(s) to option"
" \"--section-start\"\n"));
/* We must copy the section name as set_section_start
@@ -1499,8 +1498,8 @@ parse_args (unsigned argc, char **argv)
/* Fall through. */
case OPTION_UR:
if (bfd_link_pic (&link_info))
- einfo (_("%F%P: -r and %s may not be used together\n"),
- bfd_link_dll (&link_info) ? "-shared" : "-pie");
+ fatal (_("%P: -r and %s may not be used together\n"),
+ bfd_link_dll (&link_info) ? "-shared" : "-pie");
link_info.type = type_relocatable;
config.build_constructors = true;
@@ -1530,7 +1529,7 @@ parse_args (unsigned argc, char **argv)
char *end;
int level ATTRIBUTE_UNUSED = strtoul (optarg, &end, 0);
if (*end)
- einfo (_("%F%P: invalid number `%s'\n"), optarg);
+ fatal (_("%P: invalid number `%s'\n"), optarg);
#if BFD_SUPPORTS_PLUGINS
report_plugin_symbols = level > 1;
#endif /* BFD_SUPPORTS_PLUGINS */
@@ -1725,7 +1724,7 @@ parse_args (unsigned argc, char **argv)
break;
case ')':
if (! ingroup)
- einfo (_("%F%P: group ended before it began (--help for usage)\n"));
+ fatal (_("%P: group ended before it began (--help for usage)\n"));
lang_leave_group ();
ingroup--;
@@ -1741,7 +1740,7 @@ parse_args (unsigned argc, char **argv)
case OPTION_REMAP_INPUTS_FILE:
if (! ldfile_add_remap_file (optarg))
- einfo (_("%F%P: failed to add remap file %s\n"), optarg);
+ fatal (_("%P: failed to add remap file %s\n"), optarg);
break;
case OPTION_REMAP_INPUTS:
@@ -1750,7 +1749,7 @@ parse_args (unsigned argc, char **argv)
if (optarg2 == NULL)
/* FIXME: Should we allow --remap-inputs=@myfile as a synonym
for --remap-inputs-file=myfile ? */
- einfo (_("%F%P: invalid argument to option --remap-inputs\n"));
+ fatal (_("%P: invalid argument to option --remap-inputs\n"));
size_t len = optarg2 - optarg;
char * pattern = xmalloc (len + 1);
memcpy (pattern, optarg, len);
@@ -1771,8 +1770,7 @@ parse_args (unsigned argc, char **argv)
char *end;
bfd_size_type cache_size = strtoul (optarg, &end, 0);
if (*end != '\0')
- einfo (_("%F%P: invalid cache memory size: %s\n"),
- optarg);
+ fatal (_("%P: invalid cache memory size: %s\n"), optarg);
link_info.max_cache_size = cache_size;
}
break;
@@ -1797,7 +1795,7 @@ parse_args (unsigned argc, char **argv)
case OPTION_POP_STATE:
if (input_flags.pushed == NULL)
- einfo (_("%F%P: no state pushed before popping\n"));
+ fatal (_("%P: no state pushed before popping\n"));
else
{
struct lang_input_statement_flags *oldp = input_flags.pushed;
@@ -1820,7 +1818,7 @@ parse_args (unsigned argc, char **argv)
else if (strcasecmp (optarg, "discard") == 0)
config.orphan_handling = orphan_handling_discard;
else
- einfo (_("%F%P: invalid argument to option"
+ fatal (_("%P: invalid argument to option"
" \"--orphan-handling\"\n"));
break;
@@ -1858,7 +1856,7 @@ parse_args (unsigned argc, char **argv)
else if (strcmp (optarg, "share-duplicated") == 0)
config.ctf_share_duplicated = true;
else
- einfo (_("%F%P: bad --ctf-share-types option: %s\n"), optarg);
+ fatal (_("%P: bad --ctf-share-types option: %s\n"), optarg);
break;
}
}
@@ -2024,7 +2022,7 @@ parse_args (unsigned argc, char **argv)
if (config.no_section_header)
{
if (bfd_link_relocatable (&link_info))
- einfo (_("%F%P: -r and -z nosectionheader may not be used together\n"));
+ fatal (_("%P: -r and -z nosectionheader may not be used together\n"));
link_info.strip = strip_all;
}
@@ -2032,9 +2030,9 @@ parse_args (unsigned argc, char **argv)
if (!bfd_link_dll (&link_info))
{
if (command_line.filter_shlib)
- einfo (_("%F%P: -F may not be used without -shared\n"));
+ fatal (_("%P: -F may not be used without -shared\n"));
if (command_line.auxiliary_filters)
- einfo (_("%F%P: -f may not be used without -shared\n"));
+ fatal (_("%P: -f may not be used without -shared\n"));
}
/* Treat ld -r -s as ld -r -S -x (i.e., strip all local symbols). I
@@ -2075,7 +2073,7 @@ set_section_start (char *sect, char *valstr)
const char *end;
bfd_vma val = bfd_scan_vma (valstr, &end, 16);
if (*end)
- einfo (_("%F%P: invalid hex number `%s'\n"), valstr);
+ fatal (_("%P: invalid hex number `%s'\n"), valstr);
lang_section_start (sect, exp_intop (val), NULL);
}
@@ -2088,7 +2086,7 @@ set_segment_start (const char *section, char *valstr)
bfd_vma val = bfd_scan_vma (valstr, &end, 16);
if (*end)
- einfo (_("%F%P: invalid hex number `%s'\n"), valstr);
+ fatal (_("%P: invalid hex number `%s'\n"), valstr);
/* If we already have an entry for this segment, update the existing
value. */
name = section + 1;