char *end;
params.call_nop_byte = strtoul (optarg + 16 , &end, 0);
if (*end)
- einfo (_("%F%P: invalid number for -z call-nop=prefix-: %s\n"),
+ fatal (_("%P: invalid number for -z call-nop=prefix-: %s\n"),
optarg + 16);
params.call_nop_as_suffix = false;
}
char *end;
params.call_nop_byte = strtoul (optarg + 16, &end, 0);
if (*end)
- einfo (_("%F%P: invalid number for -z call-nop=suffix-: %s\n"),
+ fatal (_("%P: invalid number for -z call-nop=suffix-: %s\n"),
optarg + 16);
params.call_nop_as_suffix = true;
}
else
- einfo (_("%F%P: unsupported option: -z %s\n"), optarg);
+ fatal (_("%P: unsupported option: -z %s\n"), optarg);
}
'
| prop_report_ibt
| prop_report_shstk);
else
- einfo (_("%F%P: invalid option for -z cet-report=: %s\n"),
+ fatal (_("%P: invalid option for -z cet-report=: %s\n"),
optarg + 11);
}
'
case OPTION_BASE_FILE:
link_info.base_file = fopen (optarg, FOPEN_WB);
if (link_info.base_file == NULL)
- einfo (_("%F%P: cannot open base file %s\n"), optarg);
+ fatal (_("%P: cannot open base file %s\n"), optarg);
break;
'
else if (strcmp (optarg + 15, "error") == 0)
params.lam_u48_report = prop_report_error;
else
- einfo (_("%F%P: invalid option for -z lam-u48-report=: %s\n"),
+ fatal (_("%P: invalid option for -z lam-u48-report=: %s\n"),
optarg + 15);
}
else if (strcmp (optarg, "lam-u57") == 0)
else if (strcmp (optarg + 15, "error") == 0)
params.lam_u57_report = prop_report_error;
else
- einfo (_("%F%P: invalid option for -z lam-u57-report=: %s\n"),
+ fatal (_("%P: invalid option for -z lam-u57-report=: %s\n"),
optarg + 15);
}
else if (strncmp (optarg, "lam-report=", 11) == 0)
params.lam_u57_report = prop_report_error;
}
else
- einfo (_("%F%P: invalid option for -z lam-report=: %s\n"),
+ fatal (_("%P: invalid option for -z lam-report=: %s\n"),
optarg + 11);
}
'
else if (strcmp (optarg + 17, "used") == 0)
params.isa_level_report = isa_level_report_used;
else
- einfo (_("%F%P: invalid option for -z isa-level-report=: %s\n"),
+ fatal (_("%P: invalid option for -z isa-level-report=: %s\n"),
optarg + 17);
}
'
char *end;
unsigned int level = strtoul (optarg + 8 , &end, 10);
if (*end != '\0' || level < 2 || level > 4)
- einfo (_("%F%P: invalid x86-64 ISA level: %s\n"), optarg);
+ fatal (_("%P: invalid x86-64 ISA level: %s\n"), optarg);
params.isa_level = level;
}
'
These will only be created if the output format is an AArch64 format,
hence we do not support linking and changing output formats at the
same time. Use a link followed by objcopy to change output formats. */
- einfo (_("%F%P: error: cannot change output format "
+ fatal (_("%P: error: cannot change output format "
"whilst linking %s binaries\n"), "AArch64");
return;
}
bfd_get_arch (link_info.output_bfd),
bfd_get_mach (link_info.output_bfd)))
{
- einfo (_("%F%P: can not create BFD: %E\n"));
+ fatal (_("%P: can not create BFD: %E\n"));
return;
}
group_size = bfd_scan_vma (optarg, &end, 0);
if (*end)
- einfo (_("%F%P: invalid number `%s'\''\n"), optarg);
+ fatal (_("%P: invalid number `%s'\''\n"), optarg);
}
break;
'
f = fopen (filename, FOPEN_RT);
if (f == NULL)
{
- einfo (_("%F%P: cannot open %s\n"), filename);
+ fatal (_("%P: cannot open %s\n"), filename);
return;
}
if (fseek (f, 0L, SEEK_END) == -1)
return;
error:
- einfo (_("%F%P: cannot read %s\n"), optarg);
fclose (f);
+ fatal (_("%P: cannot read %s\n"), optarg);
}
static bool
size = (p->count + 2) * 4;
if (!bfd_xcoff_link_record_set (link_info.output_bfd, &link_info,
p->h, size))
- einfo (_("%F%P: bfd_xcoff_link_record_set failed: %E\n"));
+ fatal (_("%P: bfd_xcoff_link_record_set failed: %E\n"));
}
}
h = bfd_link_hash_lookup (link_info.hash, el->name, false, false, false);
if (h == NULL)
- einfo (_("%F%P: bfd_link_hash_lookup of export symbol failed: %E\n"));
+ fatal (_("%P: bfd_link_hash_lookup of export symbol failed: %E\n"));
if (!bfd_xcoff_export_symbol (link_info.output_bfd, &link_info, h))
- einfo (_("%F%P: bfd_xcoff_export_symbol failed: %E\n"));
+ fatal (_("%P: bfd_xcoff_export_symbol failed: %E\n"));
}
/* Track down all relocations called for by the linker script (these
(link_info.output_bfd, &link_info, libpath, entry_symbol.name,
file_align, maxstack, maxdata, gc && !unix_ld,
modtype, textro, flags, special_sections, rtld))
- einfo (_("%F%P: failed to set dynamic section sizes: %E\n"));
+ fatal (_("%P: failed to set dynamic section sizes: %E\n"));
/* Look through the special sections, and put them in the right
place in the link ordering. This is especially magic. */
is = NULL;
os = lang_output_section_get (sec->output_section);
if (os == NULL)
- einfo (_("%F%P: can't find output section %s\n"),
- sec->output_section->name);
+ fatal (_("%P: can't find output section %pA\n"),
+ sec->output_section);
for (pls = &os->children.head; *pls != NULL; pls = &(*pls)->header.next)
{
if (is == NULL)
{
- einfo (_("%F%P: can't find %s in output section\n"),
- bfd_section_name (sec));
+ fatal (_("%P: can't find %pA in output section\n"), sec);
}
/* Now figure out where the section should go. */
/* Now that everything is in place, finalize the dynamic sections. */
if (!bfd_xcoff_build_dynamic_sections (link_info.output_bfd, &link_info))
- einfo (_("%F%P: failed to layout dynamic sections: %E\n"));
+ fatal (_("%P: failed to layout dynamic sections: %E\n"));
if (!bfd_link_relocatable (&link_info))
{
if (f == NULL)
{
bfd_set_error (bfd_error_system_call);
- einfo ("%F%P: %s: %E\n", filename);
+ fatal ("%P: %s: %E\n", filename);
return;
}
obstack_free (o, obstack_base (o));
}
else if (*s == '(')
- einfo (_("%F%P:%s:%d: #! ([member]) is not supported "
+ fatal (_("%P:%s:%d: #! ([member]) is not supported "
"in import files\n"),
filename, linenumber);
else
*s = '\0';
if (!bfd_xcoff_split_import_path (link_info.output_bfd,
start, &imppath, &impfile))
- einfo (_("%F%P: could not parse import path: %E\n"));
+ fatal (_("%P: could not parse import path: %E\n"));
while (ISSPACE (cs))
{
++s;
rs = &s->reloc_statement;
if (rs->name == NULL)
- einfo (_("%F%P: only relocations against symbols are permitted\n"));
+ fatal (_("%P: only relocations against symbols are permitted\n"));
if (!bfd_xcoff_link_count_reloc (link_info.output_bfd, &link_info,
rs->name))
- einfo (_("%F%P: bfd_xcoff_link_count_reloc failed: %E\n"));
+ fatal (_("%P: bfd_xcoff_link_count_reloc failed: %E\n"));
}
if (s->header.type == lang_assignment_statement_enum)
if (!bfd_xcoff_record_link_assignment (link_info.output_bfd,
&link_info,
exp->assign.dst))
- einfo (_("%F%P: failed to record assignment to %s: %E\n"),
+ fatal (_("%P: failed to record assignment to %s: %E\n"),
exp->assign.dst);
}
gld${EMULATION_NAME}_find_exp_assignment (exp->assign.src);
bfd_get_arch (link_info.output_bfd),
bfd_get_mach (link_info.output_bfd)))
{
- einfo (_("%F%P: can not create stub BFD: %E\n"));
+ fatal (_("%P: can not create stub BFD: %E\n"));
return;
}
/* Pass linker params to the back-end. */
if (!bfd_xcoff_link_init (&link_info, ¶ms))
- einfo (_("%F%P: can not init BFD: %E\n"));
+ fatal (_("%P: can not init BFD: %E\n"));
/* __rtinit */
if (link_info.init_function != NULL
bfd_get_arch (link_info.output_bfd),
bfd_get_mach (link_info.output_bfd)))
{
- einfo (_("%F%P: can not create BFD: %E\n"));
+ fatal (_("%P: can not create BFD: %E\n"));
return;
}
link_info.fini_function,
rtld))
{
- einfo (_("%F%P: can not create BFD: %E\n"));
+ fatal (_("%P: can not create BFD: %E\n"));
return;
}
These will only be created if the output format is an arm format,
hence we do not support linking and changing output formats at the
same time. Use a link followed by objcopy to change output formats. */
- einfo (_("%F%P: error: cannot change output format "
+ fatal (_("%P: error: cannot change output format "
"whilst linking %s binaries\n"), "ARM");
return;
}
bfd_get_target (link_info.output_bfd));
if (params.in_implib_bfd == NULL)
- einfo (_("%F%P: %s: can't open: %E\n"), in_implib_filename);
+ fatal (_("%P: %s: can't open: %E\n"), in_implib_filename);
if (!bfd_check_format (params.in_implib_bfd, bfd_object))
- einfo (_("%F%P: %s: not a relocatable file: %E\n"), in_implib_filename);
+ fatal (_("%P: %s: not a relocatable file: %E\n"), in_implib_filename);
}
bfd_elf32_arm_set_target_params (link_info.output_bfd, &link_info, ¶ms);
bfd_get_arch (link_info.output_bfd),
bfd_get_mach (link_info.output_bfd)))
{
- einfo (_("%F%P: can not create BFD: %E\n"));
+ fatal (_("%P: can not create BFD: %E\n"));
return;
}
group_size = bfd_scan_vma (optarg, &end, 0);
if (*end)
- einfo (_("%F%P: invalid number `%s'\''\n"), optarg);
+ fatal (_("%P: invalid number `%s'\''\n"), optarg);
}
break;
if (bfd_get_flavour (link_info.output_bfd) != bfd_target_elf_flavour)
{
- einfo (_("%F%P: error: cannot change output format "
+ fatal (_("%P: error: cannot change output format "
"whilst linking %s binaries\n"), "AVR");
return;
}
return;
}
}
- einfo (_("%F%P: invalid subsystem type %s\n"), optarg);
+ fatal (_("%P: invalid subsystem type %s\n"), optarg);
}
char *end;
set_pe_name (name, strtoul (optarg, &end, 0));
if (end == optarg)
- {
- einfo (_("%F%P: invalid hex number for PE parameter '%s'\n"), optarg);
- }
+ fatal (_("%P: invalid hex number for PE parameter '%s'\n"), optarg);
optarg = end;
}
set_pe_value (comname);
}
else if (*optarg)
- {
- einfo (_("%F%P: strange hex info for PE parameter '%s'\n"), optarg);
- }
+ fatal (_("%P: strange hex info for PE parameter '%s'\n"), optarg);
}
case OPTION_BASE_FILE:
link_info.base_file = fopen (optarg, FOPEN_WB);
if (link_info.base_file == NULL)
- einfo (_("%F%P: cannot open base file %s\n"), optarg);
+ fatal (_("%P: cannot open base file %s\n"), optarg);
break;
/* PE options */
FIXME: This should be done via a function, rather than by
including an internal BFD header. */
if (!obj_pe (link_info.output_bfd))
- {
- einfo (_("%F%P: PE operations on non PE file\n"));
- }
+ fatal (_("%P: PE operations on non PE file\n"));
pe_data(link_info.output_bfd)->pe_opthdr = pe;
pe_data(link_info.output_bfd)->dll = init[DLLOFF].value;
if (!bfd_get_section_contents (sa->owner, sa, &a_sec, (file_ptr) 0,
(bfd_size_type) sizeof (a_sec)))
- einfo (_("%F%P: %pB: can't read contents of section .idata: %E\n"),
+ fatal (_("%P: %pB: can't read contents of section .idata: %E\n"),
sa->owner);
if (!bfd_get_section_contents (sb->owner, sb, &b_sec, (file_ptr) 0,
(bfd_size_type) sizeof (b_sec)))
- einfo (_("%F%P: %pB: can't read contents of section .idata: %E\n"),
+ fatal (_("%P: %pB: can't read contents of section .idata: %E\n"),
sb->owner);
i = a_sec < b_sec ? -1 : 0;
/* Everything from the '\$' on gets deleted so don't allow '\$' as the
first character. */
if (*secname == '\$')
- einfo (_("%F%P: section %s has '\$' as first character\n"), secname);
+ fatal (_("%P: section %s has '\$' as first character\n"), secname);
if (strchr (secname + 1, '\$') == NULL)
return NULL;
}
ps[0] = 0;
if (l == NULL)
- einfo (_("%F%P: *(%s\$) missing from linker script\n"), output_secname);
+ fatal (_("%P: *(%s\$) missing from linker script\n"), output_secname);
/* Link the input section in and we're done for now.
The sections still have to be sorted, but that has to wait until
COFF and ELF. */
if (bfd_get_flavour (abfd) != bfd_target_coff_flavour
&& bfd_get_flavour (abfd) != bfd_target_elf_flavour)
- einfo (_("%F%P: %pB: all input objects must be COFF or ELF "
+ fatal (_("%P: %pB: all input objects must be COFF or ELF "
"for --embedded-relocs\n"));
datasec = bfd_get_section_by_name (abfd, ".data.rel");
| SEC_IN_MEMORY))
|| !bfd_set_section_alignment (relsec, 2)
|| !bfd_set_section_size (relsec, datasec->reloc_count * 8))
- einfo (_("%F%P: %pB: can not create .emreloc section: %E\n"));
+ fatal (_("%P: %pB: can not create .emreloc section: %E\n"));
}
/* Double check that all other data sections are empty, as is
bfd_get_arch (link_info.output_bfd),
bfd_get_mach (link_info.output_bfd)))
{
- einfo (_("%F%P: can not create BFD: %E\n"));
+ fatal (_("%P: can not create BFD: %E\n"));
return;
}
group_size = bfd_scan_vma (optarg, &end, 0);
if (*end)
- einfo (_("%F%P: invalid number `%s'\''\n"), optarg);
+ fatal (_("%P: invalid number `%s'\''\n"), optarg);
}
break;
'
{
#ifndef HAVE_ZSTD
if (config.compress_debug == COMPRESS_DEBUG_ZSTD)
- einfo (_ ("%F%P: --compress-debug-sections=zstd: ld is not built "
- "with zstd support\n"));
+ fatal (_("%P: --compress-debug-sections=zstd: ld is not built "
+ "with zstd support\n"));
#endif
}
if (config.compress_debug == COMPRESS_UNKNOWN)
- einfo (_("%F%P: invalid --compress-debug-sections option: \`%s'\n"),
+ fatal (_("%P: invalid --compress-debug-sections option: \`%s'\n"),
optarg);
break;
link_info.emit_gnu_hash = true;
}
else
- einfo (_("%F%P: invalid hash style \`%s'\n"), optarg);
+ fatal (_("%P: invalid hash style \`%s'\n"), optarg);
break;
EOF
link_info.maxpagesize = strtoul (optarg + 14, &end, 0);
if (*end
|| (link_info.maxpagesize & (link_info.maxpagesize - 1)) != 0)
- einfo (_("%F%P: invalid maximum page size \`%s'\n"),
+ fatal (_("%P: invalid maximum page size \`%s'\n"),
optarg + 14);
link_info.maxpagesize_is_set = true;
}
link_info.commonpagesize = strtoul (optarg + 17, &end, 0);
if (*end
|| (link_info.commonpagesize & (link_info.commonpagesize - 1)) != 0)
- einfo (_("%F%P: invalid common page size \`%s'\n"),
+ fatal (_("%P: invalid common page size \`%s'\n"),
optarg + 17);
link_info.commonpagesize_is_set = true;
}
char *end;
link_info.stacksize = strtoul (optarg + 11, &end, 0);
if (*end || link_info.stacksize < 0)
- einfo (_("%F%P: invalid stack size \`%s'\n"), optarg + 11);
+ fatal (_("%P: invalid stack size \`%s'\n"), optarg + 11);
if (!link_info.stacksize)
/* Use -1 for explicit no-stack, because zero means
'default'. */
else if (strcmp (optarg, "start-stop-visibility=protected") == 0)
link_info.start_stop_visibility = STV_PROTECTED;
else
- einfo (_("%F%P: invalid visibility in \`-z %s'; "
+ fatal (_("%P: invalid visibility in \`-z %s'; "
"must be default, internal, hidden, or protected"),
optarg);
}
bfd_get_arch (link_info.output_bfd),
bfd_get_mach (link_info.output_bfd)))
{
- einfo (_("%F%P: can not create BFD: %E\n"));
+ fatal (_("%P: can not create BFD: %E\n"));
return;
}
const char *end;
group_size = bfd_scan_vma (optarg, &end, 0);
if (*end)
- einfo (_("%F%P: invalid number `%s'\''\n"), optarg);
+ fatal (_("%P: invalid number `%s'\''\n"), optarg);
}
break;
'
EOF
if test x"${EMULATION_NAME}" != x"elf64kvx_linux"; then
fragment <<EOF
- if (bfd_link_pie (&link_info)) {
- einfo (_("%F:%P: -pie not supported\n"));
- }
+ if (bfd_link_pie (&link_info))
+ fatal (_(":%P: -pie not supported\n"));
EOF
fi
fragment <<EOF
ldlang_add_file (stub_file);
if (!kvx_elf${ELFSIZE}_init_stub_bfd (&link_info, stub_file->the_bfd))
- einfo ("%F%P: can not init BFD: %E\n");
+ einfo ("%P: can not init BFD: %E\n");
}
&& !bfd_link_relocatable (&link_info))
{
if (lang_phdr_list == NULL)
- elf_seg_map (link_info.output_bfd) = NULL;
+ elf_seg_map (link_info.output_bfd) = NULL;
if (!_bfd_elf_map_sections_to_segments (link_info.output_bfd,
&link_info,
NULL))
- einfo (_("%F%P: map sections to segments failed: %E\n"));
+ fatal (_("%P: map sections to segments failed: %E\n"));
}
/* Adjust program header size and .eh_frame_hdr size before
bfd_get_arch (link_info.output_bfd),
bfd_get_mach (link_info.output_bfd)))
{
- einfo (_("%F%P: can not create BFD: %E\n"));
+ fatal (_("%P: can not create BFD: %E\n"));
return;
}
asection *datasec;
if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
- einfo (_("%F%P: %pB: all input objects must be ELF "
+ fatal (_("%P: %pB: all input objects must be ELF "
"for --embedded-relocs\n"));
datasec = bfd_get_section_by_name (abfd, ".data");
if (relsec == NULL
|| !bfd_set_section_alignment (relsec, 2)
|| !bfd_set_section_size (relsec, datasec->reloc_count * 12))
- einfo (_("%F%P: %pB: can not create .emreloc section: %E\n"));
+ fatal (_("%P: %pB: can not create .emreloc section: %E\n"));
}
/* Double check that all other data sections are empty, as is
bfd_get_arch (link_info.output_bfd),
bfd_get_mach (link_info.output_bfd)))
{
- einfo (_("%F%P: can not create BFD: %E\n"));
+ fatal (_("%P: can not create BFD: %E\n"));
return;
}
const char *end;
group_size = bfd_scan_vma (optarg, &end, 0);
if (*end)
- einfo (_("%F%P: invalid number `%s'\''\n"), optarg);
+ fatal (_("%P: invalid number `%s'\''\n"), optarg);
}
break;
'
bfd_get_arch (link_info.output_bfd),
bfd_get_mach (link_info.output_bfd)))
{
- einfo (_("%F%P: can not create BFD: %E\n"));
+ fatal (_("%P: can not create BFD: %E\n"));
return NULL;
}
stub_bfd->flags |= BFD_LINKER_CREATED;
bfd_set_section_vma (sec, 0);
if (!_bfd_mmix_after_linker_allocation (link_info.output_bfd, &link_info))
- {
- /* This is a fatal error; make einfo call not return. */
- einfo (_("%F%P: can't finalize linker-allocated global registers\n"));
- }
+ fatal (_("%P: can't finalize linker-allocated global registers\n"));
}
EOF
if (strstr (bfd_get_target (link_info.output_bfd), "nds32") == NULL)
{
/* Check the output target is nds32. */
- einfo (_("%F%P: error: cannot change output format whilst "
+ fatal (_("%P: error: cannot change output format whilst "
"linking %s binaries\n"), "NDS32");
return;
}
&& abi_ver != (elf_elfheader (abfd)->e_flags & EF_NDS_ABI))
{
/* Incompatible objects. */
- einfo (_("%F%P: %pB: ABI version of object files mismatched\n"),
+ fatal (_("%P: %pB: ABI version of object files mismatched\n"),
abfd);
}
}
{
sym_ld_script = fopen (optarg, FOPEN_WT);
if(sym_ld_script == NULL)
- einfo (_("%F%P: cannot open map file %s: %E\n"), optarg);
+ fatal (_("%P: cannot open map file %s: %E\n"), optarg);
}
break;
case OPTION_HYPER_RELAX:
is called before this function, stub_file should already be defined. */
if (!stub_file)
{
- einfo (_("%F%P: cannot create .note section in stub BFD.\n"));
+ fatal (_("%P: cannot create .note section in stub BFD.\n"));
return NULL;
}
note_sec = bfd_make_section_anyway_with_flags (stub_file->the_bfd, ".note", flags);
if (! note_sec)
{
- einfo (_("%F%P: failed to create .note section\n"));
+ fatal (_("%P: failed to create .note section\n"));
return NULL;
}
sec->contents = xmalloc(sec->size);
if (!bfd_get_section_contents (sec->owner, sec, sec->contents, (file_ptr) 0,
sec->size))
- einfo (_("%F%P: %pB: can't read contents of section .note: %E\n"),
+ fatal (_("%P: %pB: can't read contents of section .note: %E\n"),
sec->owner);
e_note = (Elf_External_Note *) sec->contents;
if (nto_lazy_stack && !link_info.stacksize)
{
- einfo (_("%F%P: error: --lazy-stack must follow -zstack-size=<size>\n"));
+ fatal (_("%P: error: --lazy-stack must follow -zstack-size=<size>\n"));
return;
}
PARSE_AND_LIST_OPTIONS=${PARSE_AND_LIST_OPTIONS}'
fprintf (file, _("\
--stack <size> Set size of the initial stack\n\
- --lazy-stack Set lazy allocation of stack\n\
+ --lazy-stack Set lazy allocation of stack\n\
"));
'
PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LIST_ARGS_CASES}'
case OPTION_STACK:
{
- char *end;
- link_info.stacksize = strtoul (optarg, &end, 0);
- if (*end || link_info.stacksize < 0)
- einfo (_("%F%P: invalid stack size `%s'\''\n"), optarg + 11);
- if (!link_info.stacksize)
- /* Use -1 for explicit no-stack, because zero means
- 'default'. */
- link_info.stacksize = -1;
- break;
+ char *end;
+ link_info.stacksize = strtoul (optarg, &end, 0);
+ if (*end || link_info.stacksize < 0)
+ fatal (_("%P: invalid stack size `%s'\''\n"), optarg + 11);
+ if (!link_info.stacksize)
+ /* Use -1 for explicit no-stack, because zero means
+ 'default'. */
+ link_info.stacksize = -1;
+ break;
}
case OPTION_LAZY_STACK:
nto_lazy_stack = true;
if (v[i].name == NULL)
{
- einfo (_("%F%P: invalid subsystem type %s\n"), optarg);
+ fatal (_("%P: invalid subsystem type %s\n"), optarg);
return;
}
set_pe_name (name, strtoul (optarg, &end, 0));
if (end == optarg)
- einfo (_("%F%P: invalid hex number for PE parameter '%s'\n"), optarg);
+ fatal (_("%P: invalid hex number for PE parameter '%s'\n"), optarg);
optarg = end;
}
set_pe_value (comname);
}
else if (*optarg)
- einfo (_("%F%P: strange hex info for PE parameter '%s'\n"), optarg);
+ fatal (_("%P: strange hex info for PE parameter '%s'\n"), optarg);
}
#define DEFAULT_BUILD_ID_STYLE "md5"
case OPTION_BASE_FILE:
link_info.base_file = fopen (optarg, FOPEN_WB);
if (link_info.base_file == NULL)
- einfo (_("%F%P: cannot open base file %s\n"), optarg);
+ fatal (_("%P: cannot open base file %s\n"), optarg);
break;
/* PE options. */
= bfd_wrapped_link_hash_lookup (link_info.output_bfd, &link_info,
rr, true, false, true);
if (!h)
- einfo (_("%F%P: bfd_link_hash_lookup failed: %E\n"));
+ fatal (_("%P: bfd_link_hash_lookup failed: %E\n"));
else
{
if (h->type == bfd_link_hash_new)
if (bfd_get_flavour (link_info.output_bfd) != bfd_target_coff_flavour
|| coff_data (link_info.output_bfd) == NULL
|| !obj_pe (link_info.output_bfd))
- einfo (_("%F%P: cannot perform PE operations on non PE output file '%pB'\n"),
+ fatal (_("%P: cannot perform PE operations on non PE output file '%pB'\n"),
link_info.output_bfd);
pe_data (link_info.output_bfd)->pe_opthdr = pe;
These will only be created if the output format is an arm format,
hence we do not support linking and changing output formats at the
same time. Use a link followed by objcopy to change output formats. */
- einfo (_("%F%P: error: cannot change output format "
+ fatal (_("%P: error: cannot change output format "
"whilst linking %s binaries\n"), "ARM");
return;
}
if (!bfd_generic_link_read_symbols (is->the_bfd))
{
- einfo (_("%F%P: %pB: could not read symbols: %E\n"),
+ fatal (_("%P: %pB: could not read symbols: %E\n"),
is->the_bfd);
return;
}
if (!bfd_generic_link_read_symbols (is->the_bfd))
{
- einfo (_("%F%P: %pB: could not read symbols: %E\n"),
+ fatal (_("%P: %pB: could not read symbols: %E\n"),
is->the_bfd);
return;
}
h = bfd_link_hash_lookup (link_info.hash, buf, true, true, true);
if (h == (struct bfd_link_hash_entry *) NULL)
- einfo (_("%F%P: bfd_link_hash_lookup failed: %E\n"));
+ fatal (_("%P: bfd_link_hash_lookup failed: %E\n"));
if (h->type == bfd_link_hash_new)
{
h->type = bfd_link_hash_undefined;
if (v[i].name == NULL)
{
- einfo (_("%F%P: invalid subsystem type %s\n"), optarg);
+ fatal (_("%P: invalid subsystem type %s\n"), optarg);
return;
}
set_pep_name (name, (bfd_vma) strtoull (optarg, &end, 0));
if (end == optarg)
- einfo (_("%F%P: invalid hex number for PE parameter '%s'\n"), optarg);
+ fatal (_("%P: invalid hex number for PE parameter '%s'\n"), optarg);
optarg = end;
}
set_pep_value (comname);
}
else if (*optarg)
- einfo (_("%F%P: strange hex info for PE parameter '%s'\n"), optarg);
+ fatal (_("%P: strange hex info for PE parameter '%s'\n"), optarg);
}
#define DEFAULT_BUILD_ID_STYLE "md5"
case OPTION_BASE_FILE:
link_info.base_file = fopen (optarg, FOPEN_WB);
if (link_info.base_file == NULL)
- einfo (_("%F%P: cannot open base file %s\n"), optarg);
+ fatal (_("%P: cannot open base file %s\n"), optarg);
break;
/* PE options. */
= bfd_wrapped_link_hash_lookup (link_info.output_bfd, &link_info,
rr, true, false, true);
if (!h)
- einfo (_("%F%P: bfd_link_hash_lookup failed: %E\n"));
+ fatal (_("%P: bfd_link_hash_lookup failed: %E\n"));
else
{
if (h->type == bfd_link_hash_new)
if (bfd_get_flavour (link_info.output_bfd) != bfd_target_coff_flavour
|| coff_data (link_info.output_bfd) == NULL
|| !obj_pe (link_info.output_bfd))
- einfo (_("%F%P: cannot perform PE operations on non PE output file '%pB'\n"),
+ fatal (_("%P: cannot perform PE operations on non PE output file '%pB'\n"),
link_info.output_bfd);
pe_data (link_info.output_bfd)->pe_opthdr = pep;
if (!bfd_generic_link_read_symbols (is->the_bfd))
{
- einfo (_("%F%P: %pB: could not read symbols: %E\n"),
+ fatal (_("%P: %pB: could not read symbols: %E\n"),
is->the_bfd);
return;
}
h = bfd_link_hash_lookup (link_info.hash, buf, true, true, true);
if (h == (struct bfd_link_hash_entry *) NULL)
- einfo (_("%F%P: bfd_link_hash_lookup failed: %E\n"));
+ fatal (_("%P: bfd_link_hash_lookup failed: %E\n"));
if (h->type == bfd_link_hash_new)
{
h->type = bfd_link_hash_undefined;
char *end;
unsigned long val = strtoul (optarg, &end, 0);
if (*end || val > 5)
- einfo (_("%F%P: invalid --plt-align `%s'\''\n"), optarg);
+ fatal (_("%P: invalid --plt-align `%s'\''\n"), optarg);
params.plt_stub_align = val;
}
else
if (*end
|| (params.pagesize < 4096 && params.pagesize != 0)
|| params.pagesize != (params.pagesize & -params.pagesize))
- einfo (_("%F%P: invalid pagesize `%s'\''\n"), optarg);
+ fatal (_("%P: invalid pagesize `%s'\''\n"), optarg);
}
break;
bfd_get_arch (link_info.output_bfd),
bfd_get_mach (link_info.output_bfd)))
{
- einfo (_("%F%P: can not create BFD: %E\n"));
+ fatal (_("%P: can not create BFD: %E\n"));
return;
}
if (params.save_restore_funcs < 0)
params.save_restore_funcs = !bfd_link_relocatable (&link_info);
if (!ppc64_elf_init_stub_bfd (&link_info, ¶ms))
- einfo (_("%F%P: can not init BFD: %E\n"));
+ fatal (_("%P: can not init BFD: %E\n"));
}
/* Called after opening files but before mapping sections. */
const char *end;
params.group_size = bfd_scan_vma (optarg, &end, 0);
if (*end)
- einfo (_("%F%P: invalid number `%s'\''\n"), optarg);
+ fatal (_("%P: invalid number `%s'\''\n"), optarg);
}
break;
char *end;
long val = strtol (optarg, &end, 0);
if (*end || (unsigned long) val + 8 > 16)
- einfo (_("%F%P: invalid --plt-align `%s'\''\n"), optarg);
+ fatal (_("%P: invalid --plt-align `%s'\''\n"), optarg);
params.plt_stub_align = val;
}
else
else if (strcasecmp (optarg, "no") == 0)
params.power10_stubs = 0;
else
- einfo (_("%F%P: invalid --power10-stubs argument `%s'\''\n"),
+ fatal (_("%P: invalid --power10-stubs argument `%s'\''\n"),
optarg);
}
else
These will only be created if the output format is a RISC-V format,
hence we do not support linking and changing output formats at the
same time. Use a link followed by objcopy to change output formats. */
- einfo (_("%F%P: error: cannot change output format"
+ fatal (_("%P: error: cannot change output format"
" whilst linking %s binaries\n"), "RISC-V");
return;
}
s390_elf_create_output_section_statements (void)
{
if (!bfd_elf_s390_set_options (&link_info, ¶ms))
- einfo (_("%F%P: can not init BFD: %E\n"));
+ fatal (_("%P: can not init BFD: %E\n"));
}
EOF
These will only be created if the output format is an score format,
hence we do not support linking and changing output formats at the
same time. Use a link followed by objcopy to change output formats. */
- einfo (_("%F%P: error: cannot change output format "
+ fatal (_("%P: error: cannot change output format "
"whilst linking %s binaries\n"), "S+core");
return;
}
/* User supplied __ovly_load. */
}
else if (mgr_stream->start == mgr_stream->end)
- einfo (_("%F%P: no built-in overlay manager\n"));
+ fatal (_("%P: no built-in overlay manager\n"));
else
{
lang_input_statement_type *ovl_is;
if (script == NULL)
{
file_err:
- einfo (_("%F%P: can not open script: %E\n"));
+ fatal (_("%P: can not open script: %E\n"));
}
return script;
}
if (*end == 0)
break;
}
- einfo (_("%F%P: invalid --local-store address range `%s'\''\n"), optarg);
+ fatal (_("%P: invalid --local-store address range `%s'\''\n"), optarg);
}
break;
if (!num_lines_set)
params.num_lines = 32;
else if ((params.num_lines & -params.num_lines) != params.num_lines)
- einfo (_("%F%P: invalid --num-lines/--num-regions `%u'\''\n"),
+ fatal (_("%P: invalid --num-lines/--num-regions `%u'\''\n"),
params.num_lines);
if (!line_size_set)
params.line_size = 1024;
else if ((params.line_size & -params.line_size) != params.line_size)
- einfo (_("%F%P: invalid --line-size/--region-size `%u'\''\n"),
+ fatal (_("%P: invalid --line-size/--region-size `%u'\''\n"),
params.line_size);
break;
&& (params.ovly_flavour != ovly_soft_icache
|| (params.num_lines & -params.num_lines) == params.num_lines))
break;
- einfo (_("%F%P: invalid --num-lines/--num-regions `%s'\''\n"), optarg);
+ fatal (_("%P: invalid --num-lines/--num-regions `%s'\''\n"), optarg);
}
break;
&& (params.ovly_flavour != ovly_soft_icache
|| (params.line_size & -params.line_size) == params.line_size))
break;
- einfo (_("%F%P: invalid --line-size/--region-size `%s'\''\n"), optarg);
+ fatal (_("%P: invalid --line-size/--region-size `%s'\''\n"), optarg);
}
break;
char *end;
params.auto_overlay_fixed = strtoul (optarg, &end, 0);
if (*end != 0)
- einfo (_("%F%P: invalid --fixed-space value `%s'\''\n"), optarg);
+ fatal (_("%P: invalid --fixed-space value `%s'\''\n"), optarg);
}
break;
char *end;
params.auto_overlay_reserved = strtoul (optarg, &end, 0);
if (*end != 0)
- einfo (_("%F%P: invalid --reserved-space value `%s'\''\n"), optarg);
+ fatal (_("%P: invalid --reserved-space value `%s'\''\n"), optarg);
}
break;
char *end;
params.extra_stack_space = strtol (optarg, &end, 0);
if (*end != 0)
- einfo (_("%F%P: invalid --extra-stack-space value `%s'\''\n"), optarg);
+ fatal (_("%P: invalid --extra-stack-space value `%s'\''\n"), optarg);
}
break;
if (is_tic6x_target ())
{
if (params.dsbt_index >= params.dsbt_size)
- {
- einfo (_("%F%P: invalid --dsbt-index %d, outside DSBT size\n"),
- params.dsbt_index);
- }
+ fatal (_("%P: invalid --dsbt-index %d, outside DSBT size\n"),
+ params.dsbt_index);
elf32_tic6x_setup (&link_info, ¶ms);
}
if (*end == 0
&& params.dsbt_index >= 0 && params.dsbt_index < 0x7fff)
break;
- einfo (_("%F%P: invalid --dsbt-index %s\n"), optarg);
+ fatal (_("%P: invalid --dsbt-index %s\n"), optarg);
}
break;
case OPTION_DSBT_SIZE:
if (*end == 0
&& params.dsbt_size >= 0 && params.dsbt_size < 0x7fff)
break;
- einfo (_("%F%P: invalid --dsbt-size %s\n"), optarg);
+ fatal (_("%P: invalid --dsbt-size %s\n"), optarg);
}
break;
case OPTION_NO_MERGE_EXIDX_ENTRIES:
lang_add_output_format (buf, NULL, NULL, 0);
}
else
- {
- einfo (_("%F%P: invalid COFF format version %s\n"), optarg);
- }
+ fatal (_("%P: invalid COFF format version %s\n"), optarg);
break;
}
return false;
These will only be created if the output format is an arm format,
hence we do not support linking and changing output formats at the
same time. Use a link followed by objcopy to change output formats. */
- einfo (_("%F%P: error: cannot change output format"
+ fatal (_("%P: error: cannot change output format"
" whilst linking %s binaries\n"), "V850");
return;
}
if (bed->elf_backend_late_size_sections
&& !bed->elf_backend_late_size_sections (link_info.output_bfd,
&link_info))
- einfo (_("%F%P: failed to set dynamic section sizes: %E\n"));
+ fatal (_("%P: failed to set dynamic section sizes: %E\n"));
before_allocation_default ();
}
data = xmalloc (info_sec->size);
if (! bfd_get_section_contents (abfd, info_sec, data, 0, info_sec->size))
- einfo (_("%F%P: %pB: cannot read contents of section %pA\n"), abfd, info_sec);
+ fatal (_("%P: %pB: cannot read contents of section %pA\n"), abfd, info_sec);
if (info_sec->size > 24
&& info_sec->size >= 24 + bfd_get_32 (abfd, data + 4)
if (is_big_endian
&& link_info.output_bfd->xvec->byteorder == BFD_ENDIAN_LITTLE)
{
- einfo (_("%F%P: little endian output does not match "
+ fatal (_("%P: little endian output does not match "
"Xtensa configuration\n"));
}
if (!is_big_endian
&& link_info.output_bfd->xvec->byteorder == BFD_ENDIAN_BIG)
{
- einfo (_("%F%P: big endian output does not match "
+ fatal (_("%P: big endian output does not match "
"Xtensa configuration\n"));
}
cannot go any further if there are any mismatches. */
if ((is_big_endian && f->the_bfd->xvec->byteorder == BFD_ENDIAN_LITTLE)
|| (!is_big_endian && f->the_bfd->xvec->byteorder == BFD_ENDIAN_BIG))
- einfo (_("%F%P: cross-endian linking for %pB not supported\n"),
+ fatal (_("%P: cross-endian linking for %pB not supported\n"),
f->the_bfd);
if (! first_bfd)
info_sec = bfd_make_section_with_flags (first_bfd, ".xtensa.info",
SEC_HAS_CONTENTS | SEC_READONLY);
if (! info_sec)
- einfo (_("%F%P: failed to create .xtensa.info section\n"));
+ fatal (_("%P: failed to create .xtensa.info section\n"));
}
if (info_sec)
{
lang_statement_union_type *l = iter_stack_current (&stack);
if (l == NULL && link_info.non_contiguous_regions)
- einfo (_("%F%P: Relaxation not supported with "
+ fatal (_("%P: Relaxation not supported with "
"--enable-non-contiguous-regions.\n"));
if (l->header.type == lang_input_section_enum)
const bfd_arch_info_type *info;
info = bfd_arch_get_compatible (link_info.output_bfd, abfd, false);
if (info == NULL)
- einfo (_("%F%P: %pB: Instruction sets of object files incompatible\n"),
+ fatal (_("%P: %pB: Instruction sets of object files incompatible\n"),
abfd);
else
bfd_set_arch_info (link_info.output_bfd, info);
return;
if (!bfd_generic_link_read_symbols (abfd))
- einfo (_("%F%P: %pB: could not read symbols: %E\n"), abfd);
+ fatal (_("%P: %pB: could not read symbols: %E\n"), abfd);
for (syms = bfd_get_outsymbols (abfd); *syms; ++syms)
{
BFD might contain a prohibited cross reference. */
if (!bfd_generic_link_read_symbols (abfd))
- einfo (_("%F%P: %pB: could not read symbols: %E\n"), abfd);
+ fatal (_("%P: %pB: could not read symbols: %E\n"), abfd);
info.sym_name = name;
info.global = global;
relsize = bfd_get_reloc_upper_bound (abfd, sec);
if (relsize < 0)
- einfo (_("%F%P: %pB: could not read relocs: %E\n"), abfd);
+ fatal (_("%P: %pB: could not read relocs: %E\n"), abfd);
if (relsize == 0)
return;
relpp = (arelent **) xmalloc (relsize);
relcount = bfd_canonicalize_reloc (abfd, sec, relpp, info->asymbols);
if (relcount < 0)
- einfo (_("%F%P: %pB: could not read relocs: %E\n"), abfd);
+ fatal (_("%P: %pB: could not read relocs: %E\n"), abfd);
p = relpp;
pend = p + relcount;
else if (!link_info.maxpagesize_is_set)
link_info.maxpagesize = link_info.commonpagesize;
else
- einfo (_("%F%P: common page size (0x%v) > maximum page size (0x%v)\n"),
+ fatal (_("%P: common page size (0x%v) > maximum page size (0x%v)\n"),
link_info.commonpagesize, link_info.maxpagesize);
}
}
if (entry->flags.just_syms
&& (bfd_get_file_flags (entry->the_bfd) & DYNAMIC) != 0)
- einfo (_("%F%P: %pB: --just-symbols may not be used on DSO\n"),
+ fatal (_("%P: %pB: --just-symbols may not be used on DSO\n"),
entry->the_bfd);
if (link_class == 0
struct bfd_link_needed_list *needs;
if (! bfd_elf_get_bfd_needed_list (abfd, &needs))
- einfo (_("%F%P: %pB: bfd_elf_get_bfd_needed_list failed: %E\n"), abfd);
+ fatal (_("%P: %pB: bfd_elf_get_bfd_needed_list failed: %E\n"), abfd);
if (needs != NULL)
{
can only check that using stat. */
if (bfd_stat (abfd, &global_stat) != 0)
- einfo (_("%F%P: %pB: bfd_stat failed: %E\n"), abfd);
+ fatal (_("%P: %pB: bfd_stat failed: %E\n"), abfd);
/* First strip off everything before the last '/'. */
soname = lbasename (bfd_get_filename (abfd));
/* Add this file into the symbol table. */
if (! bfd_link_add_symbols (abfd, &link_info))
- einfo (_("%F%P: %pB: error adding symbols: %E\n"), abfd);
+ fatal (_("%P: %pB: error adding symbols: %E\n"), abfd);
return true;
}
&& elf_dt_name (abfd) != NULL)
{
if (bfd_elf_add_dt_needed_tag (abfd, &link_info) < 0)
- einfo (_("%F%P: failed to add DT_NEEDED dynamic tag\n"));
+ fatal (_("%P: failed to add DT_NEEDED dynamic tag\n"));
}
link_info.input_bfds_tail = save_input_bfd_tail;
bfd_get_target (link_info.output_bfd));
if (link_info.out_implib_bfd == NULL)
- {
- einfo (_("%F%P: %s: can't open for writing: %E\n"),
- command_line.out_implib_filename);
- }
+ fatal (_("%P: %s: can't open for writing: %E\n"),
+ command_line.out_implib_filename);
}
if (ldelf_emit_note_gnu_build_id != NULL
&& (elf_tdata (abfd)->elf_header->e_type == ET_EXEC
|| (elf_tdata (abfd)->elf_header->e_type == ET_DYN
&& elf_tdata (abfd)->is_pie)))
- einfo (_("%F%P: cannot use executable file '%pB' as input to a link\n"),
+ fatal (_("%P: cannot use executable file '%pB' as input to a link\n"),
abfd);
}
}
else if (seen_type != type)
{
- einfo (_("%F%P: compact frame descriptions incompatible with"
+ fatal (_("%P: compact frame descriptions incompatible with"
" DWARF2 .eh_frame from %pB\n"),
type == DWARF2_EH_HDR ? abfd : elfbfd);
break;
if (link_info.eh_frame_hdr_type == COMPACT_EH_HDR)
if (!bfd_elf_parse_eh_frame_entries (NULL, &link_info))
- einfo (_("%F%P: failed to parse EH frame entries\n"));
+ fatal (_("%P: failed to parse EH frame entries\n"));
ldelf_handle_dt_needed (htab, use_libpath, native, is_linux,
is_freebsd, elfsize, prefix);
&link_info,
exp->assign.dst, provide,
exp->assign.hidden))
- einfo (_("%F%P: failed to record assignment to %s: %E\n"),
+ fatal (_("%P: failed to record assignment to %s: %E\n"),
exp->assign.dst);
}
ldelf_find_exp_assignment (exp->assign.src);
command_line.filter_shlib, *audit, *depaudit,
(const char * const *) command_line.auxiliary_filters,
&link_info, &sinterp)))
- einfo (_("%F%P: failed to set dynamic section sizes: %E\n"));
+ fatal (_("%P: failed to set dynamic section sizes: %E\n"));
if (sinterp != NULL)
{
msg = (char *) xmalloc ((size_t) (sz + 1));
if (! bfd_get_section_contents (is->the_bfd, s, msg,
(file_ptr) 0, sz))
- einfo (_("%F%P: %pB: can't read contents of section .gnu.warning: %E\n"),
- is->the_bfd);
+ fatal (_("%P: %pB: can't read contents of section %pA: %E\n"),
+ is->the_bfd, s);
msg[sz] = '\0';
(*link_info.callbacks->warning) (&link_info, msg,
(const char *) NULL, is->the_bfd,
before_allocation_default ();
if (!bfd_elf_size_dynsym_hash_dynstr (link_info.output_bfd, &link_info))
- einfo (_("%F%P: failed to set dynamic section sizes: %E\n"));
+ fatal (_("%P: failed to set dynamic section sizes: %E\n"));
if (ehdr_start != NULL)
{
if (os_info->ordered != os_info->count
&& bfd_link_relocatable (&link_info))
{
- einfo (_("%F%P: "
+ fatal (_("%P: "
"%pA has both ordered and unordered sections\n"),
os->bfd_section);
return;
if (!_bfd_elf_map_sections_to_segments (link_info.output_bfd,
&link_info,
&need_layout))
- einfo (_("%F%P: map sections to segments failed: %E\n"));
+ fatal (_("%P: map sections to segments failed: %E\n"));
if (phdr_size != elf_program_header_size (link_info.output_bfd))
{
while (need_layout && --tries);
if (tries == 0)
- einfo (_("%F%P: looping in map_segments\n"));
+ fatal (_("%P: looping in map_segments\n"));
if (bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour
&& lang_phdr_list == NULL)
const struct elf_backend_data *bed
= get_elf_backend_data (link_info.output_bfd);
if (bed->elf_backend_strip_zero_sized_dynamic_sections
- && !bed->elf_backend_strip_zero_sized_dynamic_sections
- (&link_info))
- einfo (_("%F%P: failed to strip zero-sized dynamic sections\n"));
+ && !bed->elf_backend_strip_zero_sized_dynamic_sections (&link_info))
+ fatal (_("%P: failed to strip zero-sized dynamic sections\n"));
}
}
{
if (ctf_link_add_strtab (ctf_output, ldelf_ctf_strtab_iter_cb,
&args) < 0)
- einfo (_("%F%P: warning: CTF strtab association failed; strings will "
+ fatal (_("%P: warning: CTF strtab association failed; strings will "
"not be shared: %s\n"),
ctf_errmsg (ctf_errno (ctf_output)));
}
lsym.st_value = sym->st_value;
if (ctf_link_add_linker_symbol (ctf_output, &lsym) < 0)
{
- einfo (_("%F%P: warning: CTF symbol addition failed; CTF will "
+ fatal (_("%P: warning: CTF symbol addition failed; CTF will "
"not be tied to symbols: %s\n"),
ctf_errmsg (ctf_errno (ctf_output)));
}
/* Shuffle all the symbols. */
if (ctf_link_shuffle_syms (ctf_output) < 0)
- einfo (_("%F%P: warning: CTF symbol shuffling failed; CTF will "
+ fatal (_("%P: warning: CTF symbol shuffling failed; CTF will "
"not be tied to symbols: %s\n"),
ctf_errmsg (ctf_errno (ctf_output)));
}
einfo (_("%P: unrecognised emulation mode: %s\n"), target);
einfo (_("Supported emulations: "));
ldemul_list_emulations (stderr);
- einfo ("%F\n");
+ fatal ("\n");
}
void
bfd_hash_allocate (table, sizeof (struct definedness_hash_entry));
if (ret == NULL)
- einfo (_("%F%P: bfd_hash_allocate failed creating symbol %s\n"), name);
+ fatal (_("%P: bfd_hash_allocate failed creating symbol %s\n"), name);
ret->by_object = 0;
ret->iteration = 0;
bfd_hash_lookup (&definedness_table, name, true, false);
if (defentry == NULL)
- einfo (_("%F%P: bfd_hash_lookup failed creating symbol %s\n"), name);
+ fatal (_("%P: bfd_hash_lookup failed creating symbol %s\n"), name);
/* If the symbol was already defined, and not by a script, then it
must be defined by an object file or by the linker target code. */
expld.result.value = ((bfd_signed_vma) lhs.value
% (bfd_signed_vma) expld.result.value);
else if (expld.phase != lang_mark_phase_enum)
- einfo (_("%F%P:%pS %% by zero\n"), tree->binary.rhs);
+ fatal (_("%P:%pS %% by zero\n"), tree->binary.rhs);
arith_result_section (&lhs);
break;
expld.result.value = ((bfd_signed_vma) lhs.value
/ (bfd_signed_vma) expld.result.value);
else if (expld.phase != lang_mark_phase_enum)
- einfo (_("%F%P:%pS / by zero\n"), tree->binary.rhs);
+ fatal (_("%P:%pS / by zero\n"), tree->binary.rhs);
arith_result_section (&lhs);
break;
if (!h)
{
if (expld.phase != lang_first_phase_enum)
- einfo (_("%F%P: bfd_link_hash_lookup failed: %E\n"));
+ fatal (_("%P: bfd_link_hash_lookup failed: %E\n"));
}
else if (h->type == bfd_link_hash_defined
|| h->type == bfd_link_hash_defweak)
else if (expld.phase == lang_final_phase_enum
|| (expld.phase != lang_mark_phase_enum
&& expld.assigning_to_dot))
- einfo (_("%F%P:%pS: undefined symbol `%s'"
+ fatal (_("%P:%pS: undefined symbol `%s'"
" referenced in expression\n"),
tree, tree->name.name);
else if (h->type == bfd_link_hash_new)
if (os == NULL)
{
if (expld.phase == lang_final_phase_enum)
- einfo (_("%F%P:%pS: undefined section `%s'"
+ fatal (_("%P:%pS: undefined section `%s'"
" referenced in expression\n"),
tree, tree->name.name);
}
if (os == NULL)
{
if (expld.phase == lang_final_phase_enum)
- einfo (_("%F%P:%pS: undefined section `%s'"
+ fatal (_("%P:%pS: undefined section `%s'"
" referenced in expression\n"),
tree, tree->name.name);
}
if (os == NULL)
{
if (expld.phase == lang_final_phase_enum)
- einfo (_("%F%P:%pS: undefined section `%s'"
+ fatal (_("%P:%pS: undefined section `%s'"
" referenced in expression\n"),
tree, tree->name.name);
new_number (0);
if (mem != NULL)
new_number (mem->length);
else
- einfo (_("%F%P:%pS: undefined MEMORY region `%s'"
+ fatal (_("%P:%pS: undefined MEMORY region `%s'"
" referenced in expression\n"),
tree, tree->name.name);
}
if (mem != NULL)
new_rel_from_abs (mem->origin);
else
- einfo (_("%F%P:%pS: undefined MEMORY region `%s'"
+ fatal (_("%P:%pS: undefined MEMORY region `%s'"
" referenced in expression\n"),
tree, tree->name.name);
}
else if (strcmp (tree->name.name, "COMMONPAGESIZE") == 0)
new_number (link_info.commonpagesize);
else
- einfo (_("%F%P:%pS: unknown constant `%s' referenced in expression\n"),
+ fatal (_("%P:%pS: unknown constant `%s' referenced in expression\n"),
tree, tree->name.name);
break;
if (tree->assign.dst[0] == '.' && tree->assign.dst[1] == 0)
{
if (tree->type.node_class != etree_assign)
- einfo (_("%F%P:%pS can not PROVIDE assignment to"
+ fatal (_("%P:%pS can not PROVIDE assignment to"
" location counter\n"), tree);
if (expld.phase != lang_first_phase_enum)
{
|| expld.section == bfd_und_section_ptr)
{
if (expld.phase != lang_mark_phase_enum)
- einfo (_("%F%P:%pS invalid assignment to"
+ fatal (_("%P:%pS invalid assignment to"
" location counter\n"), tree);
}
else if (expld.dotp == NULL)
- einfo (_("%F%P:%pS assignment to location counter"
+ fatal (_("%P:%pS assignment to location counter"
" invalid outside of SECTIONS\n"), tree);
/* After allocation, assignment to dot should not be
nextdot += expld.section->vma;
if (nextdot < expld.dot
&& expld.section != bfd_abs_section_ptr)
- einfo (_("%F%P:%pS cannot move location counter backwards"
+ fatal (_("%P:%pS cannot move location counter backwards"
" (from %V to %V)\n"),
tree, expld.dot, nextdot);
else
h = bfd_link_hash_lookup (link_info.hash, tree->assign.dst,
true, false, true);
if (h == NULL)
- einfo (_("%F%P:%s: hash creation failed\n"),
+ fatal (_("%P:%s: hash creation failed\n"),
tree->assign.dst);
}
if (expld.result.valid_p)
return expld.result.value;
else if (name != NULL && expld.phase != lang_mark_phase_enum)
- einfo (_("%F%P:%pS: nonconstant expression for %s\n"),
+ fatal (_("%P:%pS: nonconstant expression for %s\n"),
tree, name);
}
return def;
if (!expld.result.valid_p)
{
if (name != NULL && expld.phase != lang_mark_phase_enum)
- einfo (_("%F%P:%pS: nonconstant expression for %s\n"),
+ fatal (_("%P:%pS: nonconstant expression for %s\n"),
tree, name);
return def;
}
}
else if (name != NULL && expld.phase != lang_mark_phase_enum)
{
- einfo (_("%F%P:%pS: nonconstant expression for %s\n"),
+ fatal (_("%P:%pS: nonconstant expression for %s\n"),
tree, name);
}
}
definedness_newfunc,
sizeof (struct definedness_hash_entry),
13))
- einfo (_("%F%P: can not create hash table: %E\n"));
+ fatal (_("%P: can not create hash table: %E\n"));
}
/* Convert absolute symbols defined by a script from "dot" (also
if (*p == '\0')
{
- einfo ("%F%P: malformed remap file entry: %s\n", line);
+ fatal ("%P: malformed remap file entry: %s\n", line);
continue;
}
if (*p == '\0')
{
- einfo ("%F%P: malformed remap file entry: %s\n", line);
+ fatal ("%P: malformed remap file entry: %s\n", line);
continue;
}
if (entry->the_bfd == NULL)
{
if (bfd_get_error () == bfd_error_invalid_target)
- einfo (_("%F%P: invalid BFD target `%s'\n"), entry->target);
+ fatal (_("%P: invalid BFD target `%s'\n"), entry->target);
return false;
}
if (!entry->flags.dynamic && (entry->the_bfd->flags & DYNAMIC) != 0)
{
- einfo (_("%F%P: attempted static link of dynamic object `%s'\n"),
+ fatal (_("%P: attempted static link of dynamic object `%s'\n"),
attempt);
bfd_close (entry->the_bfd);
entry->the_bfd = NULL;
if ((open_how != script_nonT || script->open_how != script_nonT)
&& strcmp (name, script->name) == 0)
{
- einfo (_("%F%P: error: linker script file '%s'"
+ fatal (_("%P: error: linker script file '%s'"
" appears multiple times\n"), name);
return;
}
if (ldlex_input_stack == NULL)
{
bfd_set_error (bfd_error_system_call);
- einfo (_("%F%P: cannot open linker script file %s: %E\n"), name);
+ fatal (_("%P: cannot open linker script file %s: %E\n"), name);
return;
}
else if (defarch != bfd_arch_unknown)
ldfile_output_architecture = defarch;
else
- einfo (_("%F%P: cannot represent machine `%s'\n"), string);
+ fatal (_("%P: cannot represent machine `%s'\n"), string);
}
/* Tidy up memory. */
CHIP exp
| CHIP exp ',' exp
| NAME {
- einfo(_("%F%P: unrecognised keyword in MRI style script '%s'\n"),$1);
+ fatal (_("%P: unrecognised keyword in MRI style script '%s'\n"), $1);
}
| LIST {
config.map_filename = "-";
einfo (_("%P:%s: file format not recognized; treating as linker script\n"),
ldlex_filename ());
if (error_index > 0 && error_index < ERROR_NAME_MAX)
- einfo (_("%F%P:%pS: %s in %s\n"), NULL, arg, error_names[error_index - 1]);
+ fatal (_("%P:%pS: %s in %s\n"), NULL, arg, error_names[error_index - 1]);
else
- einfo ("%F%P:%pS: %s\n", NULL, arg);
+ fatal ("%P:%pS: %s\n", NULL, arg);
}
output_section_statement_newfunc,
sizeof (struct out_section_hash_entry),
61))
- einfo (_("%F%P: can not create hash table: %E\n"));
+ fatal (_("%P: can not create hash table: %E\n"));
}
static void
the default memory region. */
if (strcmp (region_name, DEFAULT_MEMORY_REGION) == 0
|| strcmp (alias, DEFAULT_MEMORY_REGION) == 0)
- einfo (_("%F%P:%pS: error: alias for default memory region\n"), NULL);
+ fatal (_("%P:%pS: error: alias for default memory region\n"), NULL);
/* Look for the target region and check if the alias is not already
in use. */
if (region == NULL && strcmp (n->name, region_name) == 0)
region = r;
if (strcmp (n->name, alias) == 0)
- einfo (_("%F%P:%pS: error: redefinition of memory region "
+ fatal (_("%P:%pS: error: redefinition of memory region "
"alias `%s'\n"),
NULL, alias);
}
/* Check if the target region exists. */
if (region == NULL)
- einfo (_("%F%P:%pS: error: memory region `%s' "
+ fatal (_("%P:%pS: error: memory region `%s' "
"for alias `%s' does not exist\n"),
NULL, region_name, alias);
if (entry == NULL)
{
if (create)
- einfo (_("%F%P: failed creating section `%s': %E\n"), name);
+ fatal (_("%P: failed creating section `%s': %E\n"), name);
return NULL;
}
name);
if (entry == NULL)
{
- einfo (_("%F%P: failed creating section `%s': %E\n"), name);
+ fatal (_("%P: failed creating section `%s': %E\n"), name);
return NULL;
}
entry->root = last_ent->root;
init_os (lang_output_section_statement_type *s, flagword flags)
{
if (strcmp (s->name, DISCARD_SECTION_NAME) == 0)
- einfo (_("%F%P: illegal use of `%s' section\n"), DISCARD_SECTION_NAME);
+ fatal (_("%P: illegal use of `%s' section\n"), DISCARD_SECTION_NAME);
if (!s->dup_output)
s->bfd_section = bfd_get_section_by_name (link_info.output_bfd, s->name);
s->name, flags);
if (s->bfd_section == NULL)
{
- einfo (_("%F%P: output format %s cannot represent section"
+ fatal (_("%P: output format %s cannot represent section"
" called %s: %E\n"),
link_info.output_bfd->xvec->name, s->name);
}
for (p = matching; *p != NULL; p++)
einfo (" %s", *p);
free (matching);
- einfo ("%F\n");
+ fatal ("\n");
}
else if (err != bfd_error_file_not_recognized
|| place == NULL)
- einfo (_("%F%P: %pB: file not recognized: %E\n"), entry->the_bfd);
+ fatal (_("%P: %pB: file not recognized: %E\n"), entry->the_bfd);
bfd_close (entry->the_bfd);
entry->the_bfd = NULL;
if (!bfd_check_format (member, bfd_object))
{
- einfo (_("%F%P: %pB: member %pB in archive is not an object\n"),
+ fatal (_("%P: %pB: member %pB in archive is not an object\n"),
entry->the_bfd, member);
loaded = false;
}
substitute BFD for us. */
if (!bfd_link_add_symbols (subsbfd, &link_info))
{
- einfo (_("%F%P: %pB: error adding symbols: %E\n"), member);
+ fatal (_("%P: %pB: error adding symbols: %E\n"), member);
loaded = false;
}
}
if (bfd_link_add_symbols (entry->the_bfd, &link_info))
entry->flags.loaded = true;
else
- einfo (_("%F%P: %pB: error adding symbols: %E\n"), entry->the_bfd);
+ fatal (_("%P: %pB: error adding symbols: %E\n"), entry->the_bfd);
return entry->flags.loaded;
}
{
char *in = lrealpath (f->local_sym_name);
if (filename_cmp (in, out) == 0)
- einfo (_("%F%P: input file '%s' is the same as output file\n"),
+ fatal (_("%P: input file '%s' is the same as output file\n"),
f->filename);
free (in);
}
if (link_info.output_bfd == NULL)
{
if (bfd_get_error () == bfd_error_invalid_target)
- einfo (_("%F%P: target %s not found\n"), output_target);
+ fatal (_("%P: target %s not found\n"), output_target);
- einfo (_("%F%P: cannot open output file %s: %E\n"), name);
+ fatal (_("%P: cannot open output file %s: %E\n"), name);
}
delete_output_file_on_failure = true;
if (!bfd_set_format (link_info.output_bfd, bfd_object))
- einfo (_("%F%P: %s: can not make object file: %E\n"), name);
+ fatal (_("%P: %s: can not make object file: %E\n"), name);
if (!bfd_set_arch_mach (link_info.output_bfd,
- ldfile_output_architecture,
- ldfile_output_machine))
- einfo (_("%F%P: %s: can not set architecture: %E\n"), name);
+ ldfile_output_architecture,
+ ldfile_output_machine))
+ fatal (_("%P: %s: can not set architecture: %E\n"), name);
link_info.hash = bfd_link_hash_table_create (link_info.output_bfd);
if (link_info.hash == NULL)
- einfo (_("%F%P: can not create hash table: %E\n"));
+ fatal (_("%P: can not create hash table: %E\n"));
bfd_set_gp_size (link_info.output_bfd, g_switch_value);
}
/* Exit if any of the files were missing. */
if (input_flags.missing_file)
- einfo ("%F");
+ fatal ("");
}
#ifdef ENABLE_LIBCTF
h = bfd_link_hash_lookup (link_info.hash, name, true, false, true);
if (h == NULL)
- einfo (_("%F%P: bfd_link_hash_lookup failed: %E\n"));
+ fatal (_("%P: bfd_link_hash_lookup failed: %E\n"));
if (h->type == bfd_link_hash_new)
{
h->type = bfd_link_hash_undefined;
else if (strcmp (name, "SHT_PREINIT_ARRAY") == 0)
type = SHT_PREINIT_ARRAY;
else
- einfo (_ ("%F%P: invalid type for output section `%s'\n"),
+ fatal (_ ("%P: invalid type for output section `%s'\n"),
os->name);
}
else
if (expld.result.valid_p)
type = expld.result.value;
else
- einfo (_ ("%F%P: invalid type for output section `%s'\n"),
+ fatal (_ ("%P: invalid type for output section `%s'\n"),
os->name);
}
break;
}
if (where == NULL)
{
- einfo (_("%F%P: %s not found for insert\n"), i->where);
+ fatal (_("%P: %s not found for insert\n"), i->where);
return;
}
if (dot + TO_ADDR (i->size) > end)
{
if (i->flags & SEC_LINKER_CREATED)
- einfo (_("%F%P: Output section `%pA' not large enough for "
+ fatal (_("%P: Output section `%pA' not large enough for "
"the linker-created stubs section `%pA'.\n"),
i->output_section, i);
if (i->rawsize && i->rawsize != i->size)
- einfo (_("%F%P: Relaxation not supported with "
+ fatal (_("%P: Relaxation not supported with "
"--enable-non-contiguous-regions (section `%pA' "
"would overflow `%pA' after it changed size).\n"),
i, i->output_section);
dot += expld.result.section->vma;
}
else if (expld.phase != lang_mark_phase_enum)
- einfo (_("%F%P:%pS: non constant or forward reference"
+ fatal (_("%P:%pS: non constant or forward reference"
" address expression for section %s\n"),
os->addr_tree, os->name);
}
overridden by the using the --no-check-sections
switch. */
if (command_line.check_section_addresses)
- einfo (_("%F%P: error: no memory region specified"
+ fatal (_("%P: error: no memory region specified"
" for loadable section `%s'\n"),
bfd_section_name (os->bfd_section));
else
bool again;
if (!bfd_relax_section (i->owner, i, &link_info, &again))
- einfo (_("%F%P: can't relax section: %E\n"));
+ fatal (_("%P: can't relax section: %E\n"));
if (again)
*relax = true;
}
s->data_statement.value += expld.result.section->vma;
}
else if (expld.phase == lang_final_phase_enum)
- einfo (_("%F%P: invalid data statement\n"));
+ fatal (_("%P: invalid data statement\n"));
{
unsigned int size;
switch (s->data_statement.type)
if (expld.result.valid_p)
s->reloc_statement.addend_value = expld.result.value;
else if (expld.phase == lang_final_phase_enum)
- einfo (_("%F%P: invalid reloc statement\n"));
+ fatal (_("%P: invalid reloc statement\n"));
dot += TO_ADDR (bfd_get_reloc_size (s->reloc_statement.howto));
break;
break;
}
if (!sym)
- einfo (_("%F%P: --gc-sections requires a defined symbol root "
+ fatal (_("%P: --gc-sections requires a defined symbol root "
"specified by -e or -u\n"));
}
+ bfd_section_vma (h->u.def.section->output_section)
+ h->u.def.section->output_offset);
if (!bfd_set_start_address (link_info.output_bfd, val))
- einfo (_("%F%P: %s: can't set start address\n"), entry_symbol.name);
+ fatal (_("%P: %s: can't set start address\n"), entry_symbol.name);
}
else
{
if (*send == '\0')
{
if (!bfd_set_start_address (link_info.output_bfd, val))
- einfo (_("%F%P: can't set start address\n"));
+ fatal (_("%P: can't set start address\n"));
}
/* BZ 2004952: Only use the start of the entry section for executables. */
else if bfd_link_executable (&link_info)
bfd_section_vma (ts));
if (!bfd_set_start_address (link_info.output_bfd,
bfd_section_vma (ts)))
- einfo (_("%F%P: can't set start address\n"));
+ fatal (_("%P: can't set start address\n"));
}
else
{
!= bfd_get_flavour (link_info.output_bfd)))
&& (bfd_get_file_flags (input_bfd) & HAS_RELOC) != 0)
{
- einfo (_("%F%P: relocatable linking with relocations from"
+ fatal (_("%P: relocatable linking with relocations from"
" format %s (%pB) to format %s (%pB) is not supported\n"),
bfd_get_target (input_bfd), input_bfd,
bfd_get_target (link_info.output_bfd), link_info.output_bfd);
- /* einfo with %F exits. */
}
if (compatible == NULL)
section = h->u.c.p->section;
if (!bfd_define_common_symbol (link_info.output_bfd, &link_info, h))
- einfo (_("%F%P: could not define common symbol `%pT': %E\n"),
+ fatal (_("%P: could not define common symbol `%pT': %E\n"),
h->root.string);
if (config.map_file != NULL)
break;
default:
- einfo (_("%F%P: invalid character %c (%d) in flags\n"),
+ fatal (_("%P: invalid character %c (%d) in flags\n"),
*flags, *flags);
break;
}
constraint,
in_section_ordering ? 0 : 2);
if (os == NULL) /* && in_section_ordering */
- einfo (_("%F%P:%pS: error: output section '%s' must already exist\n"),
+ fatal (_("%P:%pS: error: output section '%s' must already exist\n"),
NULL, output_section_statement_name);
current_section = os;
os->align_lma_with_input = align_with_input == ALIGN_WITH_INPUT;
if (os->align_lma_with_input && align != NULL)
- einfo (_("%F%P:%pS: error: align with input and explicit align specified\n"),
+ fatal (_("%P:%pS: error: align with input and explicit align specified\n"),
NULL);
os->subsection_alignment = subalign;
lang_place_undefineds ();
if (!bfd_section_already_linked_table_init ())
- einfo (_("%F%P: can not create hash table: %E\n"));
+ fatal (_("%P: can not create hash table: %E\n"));
/* A first pass through the memory regions ensures that if any region
references a symbol for its origin or length then this symbol will be
files = file_chain;
inputfiles = input_file_chain;
if (plugin_call_all_symbols_read ())
- einfo (_("%F%P: %s: plugin reported error after all symbols read\n"),
+ fatal (_("%P: %s: plugin reported error after all symbols read\n"),
plugin_error_plugin ());
link_info.lto_all_symbols_read = true;
/* Open any newly added files, updating the file chains. */
assigning dynamic symbols, since removing whole input sections
is hard then. */
if (!bfd_merge_sections (link_info.output_bfd, &link_info))
- einfo (_("%F%P: bfd_merge_sections failed: %E\n"));
+ fatal (_("%P: bfd_merge_sections failed: %E\n"));
/* Look for a text section and set the readonly attribute in it. */
found = bfd_get_section_by_name (link_info.output_bfd, ".text");
lang_startup (const char *name)
{
if (first_file->filename != NULL)
- {
- einfo (_("%F%P: multiple STARTUP files\n"));
- }
+ fatal (_("%P: multiple STARTUP files\n"));
first_file->filename = name;
first_file->local_sym_name = name;
first_file->flags.real = true;
break;
}
if (last == NULL)
- einfo (_("%F%P: no sections assigned to phdrs\n"));
+ fatal (_("%P: no sections assigned to phdrs\n"));
}
pl = last;
}
if (!bfd_record_phdr (link_info.output_bfd, l->type,
l->flags != NULL, flags, l->at != NULL,
at, l->filehdr, l->phdrs, c, secs))
- einfo (_("%F%P: bfd_record_phdr failed: %E\n"));
+ fatal (_("%P: bfd_record_phdr failed: %E\n"));
}
free (secs);
loser:
arg->status = 1;
- einfo (_("%P%F: setup_section: %s: %s\n"), err, name);
+ fatal (_("%P: setup_section: %s: %s\n"), err, name);
}
/* Copy the data of input section ISECTION of IBFD
return;
loser:
- einfo (_("%P%F: copy_section: %s: %s\n"), err, isection->name);
+ fatal (_("%P: copy_section: %s: %s\n"), err, isection->name);
}
/* Open the temporary bfd created in the same directory as PATH. */
if (!bfd_close (obfd))
{
unlink (ofilename);
- einfo (_("%P%F: failed to finish output with object-only section\n"));
+ fatal (_("%P: failed to finish output with object-only section\n"));
}
/* Must be freed after bfd_close (). */
if (rename (ofilename, output_filename))
{
unlink (ofilename);
- einfo (_("%P%F: failed to rename output with object-only section\n"));
+ fatal (_("%P: failed to rename output with object-only section\n"));
}
free (ofilename);
unlink (ofilename);
free (ofilename);
}
- einfo (_("%P%F: failed to add object-only section: %s\n"), err);
+ fatal (_("%P: failed to add object-only section: %s\n"), err);
}
/* Emit the final output with object-only section. */
ldemul_create_output_section_statements ();
if (!bfd_section_already_linked_table_init ())
- einfo (_("%P%F: Failed to create hash table\n"));
+ fatal (_("%P: Failed to create hash table\n"));
/* Call cmdline_on_object_only_archive_list_p to check which member
should be loaded. */
lang_finish ();
if (! bfd_close (link_info.output_bfd))
- einfo (_("%P%F:%s: final close failed on object-only output: %E\n"),
- output_filename);
+ fatal (_("%P:%s: final close failed on object-only output: %E\n"),
+ output_filename);
link_info.output_bfd = NULL;
if (fd < 0)
{
bfd_set_error (bfd_error_system_call);
- einfo (_("%P%F:%s: cannot open object-only output: %E\n"),
+ fatal (_("%P:%s: cannot open object-only output: %E\n"),
output_filename);
}
if (fstat (fd, &st) != 0)
{
bfd_set_error (bfd_error_system_call);
- einfo (_("%P%F:%s: cannot stat object-only output: %E\n"),
+ fatal (_("%P:%s: cannot stat object-only output: %E\n"),
output_filename);
}
if (got < 0)
{
bfd_set_error (bfd_error_system_call);
- einfo (_("%P%F:%s: read failed on object-only output: %E\n"),
+ fatal (_("%P:%s: read failed on object-only output: %E\n"),
output_filename);
}
const char *name = bfd_extract_object_only_section (abfd);
if (name == NULL)
- einfo (_("%P%F: cannot extract object-only section from %B: %E\n"),
- abfd);
+ fatal (_("%P: cannot extract object-only section from %B: %E\n"), abfd);
/* It should be removed after it is done. */
cmdline_list_append (&cmdline_temp_object_only_list,
if (bfd_link_add_symbols (entry->the_bfd, &link_info))
entry->flags.loaded = true;
else
- einfo (_("%F%P: %pB: error adding symbols: %E\n"), entry->the_bfd);
+ fatal (_("%P: %pB: error adding symbols: %E\n"), entry->the_bfd);
}
/* Check and handle the object-only section. */
lex_push_file (FILE *file, const char *name, unsigned int sysrooted)
{
if (include_stack_ptr >= MAX_INCLUDE_DEPTH)
- {
- einfo (_("%F:includes nested too deeply\n"));
- }
+ fatal (_("%P: includes nested too deeply\n"));
file_name_stack[include_stack_ptr] = name;
lineno_stack[include_stack_ptr] = lineno;
sysrooted_stack[include_stack_ptr] = input_flags.sysrooted;
yy_init = 0;
if (include_stack_ptr >= MAX_INCLUDE_DEPTH)
- {
- einfo (_("%F: macros nested too deeply\n"));
- }
+ fatal (_("%P: macros nested too deeply\n"));
file_name_stack[include_stack_ptr] = fake_filename;
lineno_stack[include_stack_ptr] = lineno;
include_stack[include_stack_ptr] = YY_CURRENT_BUFFER;
{
result = fread (buf, 1, max_size, yyin);
if (result < max_size && ferror (yyin))
- einfo (_("%F%P: read in flex scanner failed\n"));
+ fatal (_("%P: read in flex scanner failed\n"));
}
}
return result;
if (c == 0)
{
- einfo (_("%F%P: EOF in comment\n"));
+ fatal (_("%P: EOF in comment\n"));
break;
}
}
if (ldfile_assumed_script)
{
bfd_set_error (bfd_error_file_not_recognized);
- einfo (_("%F%s: file not recognized: %E\n"), ldlex_filename ());
+ fatal (_("%s: file not recognized: %E\n"), ldlex_filename ());
}
if (! ISPRINT (*what))
if (out == NULL)
{
bfd_set_error (bfd_error_system_call);
- einfo (_("%F%P: cannot open dependency file %s: %E\n"),
+ fatal (_("%P: cannot open dependency file %s: %E\n"),
config.dependency_file);
}
expandargv (&argc, &argv);
if (bfd_init () != BFD_INIT_MAGIC)
- einfo (_("%F%P: fatal error: libbfd ABI mismatch\n"));
+ fatal (_("%P: fatal error: libbfd ABI mismatch\n"));
bfd_set_error_program_name (program_name);
xexit (0);
if (link_info.inhibit_common_definition && !bfd_link_dll (&link_info))
- einfo (_("%F%P: --no-define-common may not be used without -shared\n"));
+ fatal (_("%P: --no-define-common may not be used without -shared\n"));
if (!lang_has_input_file)
{
if (version_printed || command_line.print_output_format)
xexit (0);
output_unknown_cmdline_warnings ();
- einfo (_("%F%P: no input files\n"));
+ fatal (_("%P: no input files\n"));
}
if (verbose)
if (config.map_file == (FILE *) NULL)
{
bfd_set_error (bfd_error_system_call);
- einfo (_("%F%P: cannot open map file %s: %E\n"),
+ einfo (_("%P: cannot open map file %s: %E\n"),
config.map_filename);
}
}
bfd *obfd = link_info.output_bfd;
link_info.output_bfd = NULL;
if (!bfd_close (obfd))
- einfo (_("%F%P: %s: final close failed: %E\n"), output_filename);
+ fatal (_("%P: %s: final close failed: %E\n"), output_filename);
link_info.output_bfd = NULL;
dst = fopen (dst_name, FOPEN_WB);
if (!src)
- einfo (_("%F%P: unable to open for source of copy `%s'\n"),
+ fatal (_("%P: unable to open for source of copy `%s'\n"),
output_filename);
if (!dst)
- einfo (_("%F%P: unable to open for destination of copy `%s'\n"),
+ fatal (_("%P: unable to open for destination of copy `%s'\n"),
dst_name);
while ((l = fread (buf, 1, bsize, src)) > 0)
{
i++;
}
else
- einfo (_("%F%P: missing argument to -m\n"));
+ fatal (_("%P: missing argument to -m\n"));
}
else if (strcmp (argv[i], "-mips1") == 0
|| strcmp (argv[i], "-mips2") == 0
bfd_hash_newfunc,
sizeof (struct bfd_hash_entry),
61))
- einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
+ fatal (_("%P: bfd_hash_table_init failed: %E\n"));
}
if (bfd_hash_lookup (link_info.notice_hash, name, true, true) == NULL)
- einfo (_("%F%P: bfd_hash_lookup failed: %E\n"));
+ fatal (_("%P: bfd_hash_lookup failed: %E\n"));
}
void
bfd_hash_newfunc,
sizeof (struct bfd_hash_entry),
61))
- einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
+ fatal (_("%P: bfd_hash_table_init failed: %E\n"));
}
if (bfd_hash_lookup (info->ignore_hash, name, true, true) == NULL)
- einfo (_("%F%P: bfd_hash_lookup failed: %E\n"));
+ fatal (_("%P: bfd_hash_lookup failed: %E\n"));
}
/* Record a symbol to be wrapped, from the --wrap option. */
bfd_hash_newfunc,
sizeof (struct bfd_hash_entry),
61))
- einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
+ fatal (_("%P: bfd_hash_table_init failed: %E\n"));
}
if (bfd_hash_lookup (link_info.wrap_hash, name, true, true) == NULL)
- einfo (_("%F%P: bfd_hash_lookup failed: %E\n"));
+ fatal (_("%P: bfd_hash_lookup failed: %E\n"));
}
/* Handle the -retain-symbols-file option. */
xmalloc (sizeof (struct bfd_hash_table));
if (!bfd_hash_table_init (link_info.keep_hash, bfd_hash_newfunc,
sizeof (struct bfd_hash_entry)))
- einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
+ fatal (_("%P: bfd_hash_table_init failed: %E\n"));
bufsize = 100;
buf = (char *) xmalloc (bufsize);
buf[len] = '\0';
if (bfd_hash_lookup (link_info.keep_hash, buf, true, true) == NULL)
- einfo (_("%F%P: bfd_hash_lookup for insertion failed: %E\n"));
+ fatal (_("%P: bfd_hash_lookup for insertion failed: %E\n"));
}
}
if (bfd_reloc_type_lookup (info->output_bfd, BFD_RELOC_CTOR) == NULL
&& (bfd_link_relocatable (info)
|| bfd_reloc_type_lookup (abfd, BFD_RELOC_CTOR) == NULL))
- einfo (_("%F%P: BFD backend error: BFD_RELOC_CTOR unsupported\n"));
+ fatal (_("%P: BFD backend error: BFD_RELOC_CTOR unsupported\n"));
s = set_name;
if (bfd_get_symbol_leading_char (abfd) != '\0')
h = bfd_link_hash_lookup (info->hash, set_name, true, true, true);
if (h == (struct bfd_link_hash_entry *) NULL)
- einfo (_("%F%P: bfd_link_hash_lookup failed: %E\n"));
+ fatal (_("%P: bfd_link_hash_lookup failed: %E\n"));
if (h->type == bfd_link_hash_new)
{
h->type = bfd_link_hash_undefined;
struct warning_callback_info cinfo;
if (!bfd_generic_link_read_symbols (abfd))
- einfo (_("%F%P: %pB: could not read symbols: %E\n"), abfd);
+ fatal (_("%P: %pB: could not read symbols: %E\n"), abfd);
cinfo.found = false;
cinfo.warning = warning;
relsize = bfd_get_reloc_upper_bound (abfd, sec);
if (relsize < 0)
- einfo (_("%F%P: %pB: could not read relocs: %E\n"), abfd);
+ fatal (_("%P: %pB: could not read relocs: %E\n"), abfd);
if (relsize == 0)
return;
relpp = (arelent **) xmalloc (relsize);
relcount = bfd_canonicalize_reloc (abfd, sec, relpp, info->asymbols);
if (relcount < 0)
- einfo (_("%F%P: %pB: could not read relocs: %E\n"), abfd);
+ fatal (_("%P: %pB: could not read relocs: %E\n"), abfd);
p = relpp;
pend = p + relcount;
void
vfinfo (FILE *fp, const char *fmt, va_list ap, bool is_warning)
{
- bool fatal = false;
+ bool isfatal = false;
const char *scan;
int arg_type;
unsigned int arg_count = 0;
case 'F':
/* Error is fatal. */
- fatal = true;
+ isfatal = true;
break;
case 'P':
if (abfd != NULL)
{
if (!bfd_generic_link_read_symbols (abfd))
- einfo (_("%F%P: %pB: could not read symbols: %E\n"), abfd);
+ fatal (_("%P: %pB: could not read symbols: %E\n"), abfd);
asymbols = bfd_get_outsymbols (abfd);
}
if (is_warning && config.fatal_warnings)
config.make_executable = false;
- if (fatal)
+ if (isfatal)
xexit (1);
}
fflush (stderr);
}
+/* Fatal error. */
+
+void
+fatal (const char *fmt, ...)
+{
+ va_list arg;
+
+ fflush (stdout);
+ va_start (arg, fmt);
+ vfinfo (stderr, fmt, arg, true);
+ va_end (arg);
+ fflush (stderr);
+ xexit (1);
+}
+
/* The buffer size for each command-line option warning. */
#define CMDLINE_WARNING_SIZE 256
void
info_assert (const char *file, unsigned int line)
{
- einfo (_("%F%P: internal error %s %d\n"), file, line);
+ fatal (_("%P: internal error %s %d\n"), file, line);
}
/* ('m' for map) Format info message and print on map. */
else
einfo (_("%P: internal error: aborting at %s:%d\n"),
file, line);
- einfo (_("%F%P: please report this bug\n"));
- xexit (1);
+ fatal (_("%P: please report this bug\n"));
}
/* Decode a hexadecimal character. Return -1 on error. */
extern void vfinfo (FILE *fp, const char *fmt, va_list arg, bool is_warning);
extern void einfo (const char *, ...);
+extern void fatal (const char *, ...) ATTRIBUTE_NORETURN;
extern void minfo (const char *, ...);
extern void info_msg (const char *, ...);
extern void lfinfo (FILE *, const char *, ...);
link_order = bfd_new_link_order (link_info.output_bfd, output_section);
if (link_order == NULL)
- einfo (_("%F%P: bfd_new_link_order failed: %E\n"));
+ fatal (_("%P: bfd_new_link_order failed: %E\n"));
link_order->type = bfd_data_link_order;
link_order->offset = statement->data_statement.output_offset;
link_order->u.data.contents = bfd_alloc (link_info.output_bfd,
QUAD_SIZE);
if (link_order->u.data.contents == NULL)
- einfo (_("%F%P: bfd_new_link_order failed: %E\n"));
+ fatal (_("%P: bfd_new_link_order failed: %E\n"));
value = statement->data_statement.value;
link_order = bfd_new_link_order (link_info.output_bfd, output_section);
if (link_order == NULL)
- einfo (_("%F%P: bfd_new_link_order failed: %E\n"));
+ fatal (_("%P: bfd_new_link_order failed: %E\n"));
link_order->offset = rs->output_offset;
link_order->size = bfd_get_reloc_size (rs->howto);
link_order->u.reloc.p = (struct bfd_link_order_reloc *)
bfd_alloc (link_info.output_bfd, sizeof (struct bfd_link_order_reloc));
if (link_order->u.reloc.p == NULL)
- einfo (_("%F%P: bfd_new_link_order failed: %E\n"));
+ fatal (_("%P: bfd_new_link_order failed: %E\n"));
link_order->u.reloc.p->reloc = rs->reloc;
link_order->u.reloc.p->addend = rs->addend_value;
link_order = bfd_new_link_order (link_info.output_bfd,
output_section);
if (link_order == NULL)
- einfo (_("%F%P: bfd_new_link_order failed: %E\n"));
+ fatal (_("%P: bfd_new_link_order failed: %E\n"));
if ((i->flags & SEC_NEVER_LOAD) != 0
&& (i->flags & SEC_DEBUGGING) == 0)
link_order = bfd_new_link_order (link_info.output_bfd,
output_section);
if (link_order == NULL)
- einfo (_("%F%P: bfd_new_link_order failed: %E\n"));
+ fatal (_("%P: bfd_new_link_order failed: %E\n"));
link_order->type = bfd_data_link_order;
link_order->size = statement->padding_statement.size;
link_order->offset = statement->padding_statement.output_offset;
if (startswith (name, ".stab")
|| strcmp (name, "$GDB_SYMBOLS$") == 0)
{
- einfo (_ ("%F%P: cannot create split section name for %s\n"), name);
- /* Silence gcc warnings. einfo exits, so we never reach here. */
+ fatal (_ ("%P: cannot create split section name for %s\n"), name);
return NULL;
}
tname[5] = 0;
|| (h = bfd_link_hash_lookup (link_info.hash,
sname, true, true, false)) == NULL)
{
- einfo (_("%F%P: clone section failed: %E\n"));
- /* Silence gcc warnings. einfo exits, so we never reach here. */
+ fatal (_("%P: clone section failed: %E\n"));
return NULL;
}
free (tname);
if (!bfd_final_link (link_info.output_bfd, &link_info))
{
if (bfd_get_error () != bfd_error_no_error)
- einfo (_("%F%P: final link failed: %E\n"));
+ fatal (_("%P: final link failed: %E\n"));
else
- einfo (_("%F%P: final link failed\n"));
+ fatal (_("%P: final link failed\n"));
}
}
&& 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]);
/* 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. */
|| 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. */
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);
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);
}
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':
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;
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;
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;
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;
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;
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:
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:
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
/* 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
/* 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;
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 */
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--;
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:
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);
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;
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;
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;
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;
}
}
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;
}
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
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);
}
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;
lang_add_output_format ("srec", NULL, NULL, 1);
else
- einfo (_("%F%P: unknown format type %s\n"), name);
+ fatal (_("%P: unknown format type %s\n"), name);
}
void
if (!bfd_generic_link_read_symbols (b))
{
- einfo (_("%F%P: %pB: could not read symbols: %E\n"), b);
+ fatal (_("%P: %pB: could not read symbols: %E\n"), b);
return;
}
bfd_get_arch (link_info.output_bfd),
bfd_get_mach (link_info.output_bfd)))
{
- einfo (_("%F%P: can not create BFD: %E\n"));
+ fatal (_("%P: can not create BFD: %E\n"));
return;
}
if (!bfd_generic_link_read_symbols (b))
{
- einfo (_("%F%P: %pB: could not read symbols: %E\n"), b);
+ fatal (_("%P: %pB: could not read symbols: %E\n"), b);
return;
}
if (!bfd_hash_table_init (import_hash,
bfd_hash_newfunc,
sizeof (struct bfd_hash_entry)))
- einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
+ fatal (_("%P: bfd_hash_table_init failed: %E\n"));
}
else
import_hash = NULL;
if (!bfd_generic_link_read_symbols (b))
{
- einfo (_("%F%P: %pB: could not read symbols: %E\n"), b);
+ fatal (_("%P: %pB: could not read symbols: %E\n"), b);
return;
}
if (!bfd_generic_link_read_symbols (b))
{
- einfo (_("%F%P: %pB: could not read symbols: %E\n"), b);
+ fatal (_("%P: %pB: could not read symbols: %E\n"), b);
return;
}
newplug->name = plugin;
newplug->dlhandle = dlopen (plugin, RTLD_NOW);
if (!newplug->dlhandle)
- einfo (_("%F%P: %s: error loading plugin: %s\n"), plugin, dlerror ());
+ fatal (_("%P: %s: error loading plugin: %s\n"), plugin, dlerror ());
/* Check if plugin has been loaded already. */
while (curplug)
}
}
report_error:
- einfo (_("%F%P: could not create dummy IR bfd: %E\n"));
+ fatal (_("%P: could not create dummy IR bfd: %E\n"));
return NULL;
}
unsigned char visibility;
if (!elfsym)
- einfo (_("%F%P: %s: non-ELF symbol in ELF BFD!\n"), asym->name);
+ fatal (_("%P: %s: non-ELF symbol in ELF BFD!\n"), asym->name);
if (ldsym->def == LDPK_COMMON)
{
switch (ldsym->visibility)
{
default:
- einfo (_("%F%P: unknown ELF symbol visibility: %d!\n"),
+ fatal (_("%P: unknown ELF symbol visibility: %d!\n"),
ldsym->visibility);
return LDPS_ERR;
/* FIXME: einfo should support %lld. */
if ((off_t) size != input->filesize)
- einfo (_("%F%P: unsupported input file size: %s (%ld bytes)\n"),
+ fatal (_("%P: unsupported input file size: %s (%ld bytes)\n"),
input->name, (long) input->filesize);
/* Check the cached view buffer. */
&& blhe->type != bfd_link_hash_common)
{
/* We should not have a new, indirect or warning symbol here. */
- einfo (_("%F%P: %s: plugin symbol table corrupt (sym type %d)\n"),
+ fatal (_("%P: %s: plugin symbol table corrupt (sym type %d)\n"),
called_plugin->name, blhe->type);
}
case LDPL_ERROR:
default:
{
- char *newfmt = concat (level == LDPL_FATAL ? "%F" : "%X",
- _("%P: error: "), format, "\n",
+ char *newfmt = concat (_("%X%P: error: "), format, "\n",
(const char *) NULL);
fflush (stdout);
vfinfo (stderr, newfmt, args, true);
fflush (stderr);
free (newfmt);
+ if (level == LDPL_FATAL)
+ fatal ("");
}
break;
}
if (!onloadfn)
onloadfn = (ld_plugin_onload) dlsym (curplug->dlhandle, "_onload");
if (!onloadfn)
- einfo (_("%F%P: %s: error loading plugin: %s\n"),
+ fatal (_("%P: %s: error loading plugin: %s\n"),
curplug->name, dlerror ());
set_tv_plugin_args (curplug, &my_tv[tv_header_size]);
called_plugin = curplug;
rv = (*onloadfn) (my_tv);
called_plugin = NULL;
if (rv != LDPS_OK)
- einfo (_("%F%P: %s: plugin error: %d\n"), curplug->name, rv);
+ fatal (_("%P: %s: plugin error: %d\n"), curplug->name, rv);
curplug = curplug->next;
}
strlength = strlen (str) + 1;
copy = bfd_alloc (abfd, strlength);
if (copy == NULL)
- einfo (_("%F%P: plugin_strdup failed to allocate memory: %s\n"),
+ fatal (_("%P: plugin_strdup failed to allocate memory: %s\n"),
bfd_get_error ());
memcpy (copy, str, strlength);
return copy;
input = bfd_alloc (abfd, sizeof (*input));
if (input == NULL)
- einfo (_("%F%P: plugin failed to allocate memory for input: %s\n"),
+ fatal (_("%P: plugin failed to allocate memory for input: %s\n"),
bfd_get_error ());
if (!bfd_plugin_open_input (ibfd, &file))
if (plugin_call_claim_file (&file, &claimed, &claim_file_handler_v2,
known_used))
- einfo (_("%F%P: %s: plugin reported error claiming file\n"),
+ fatal (_("%P: %s: plugin reported error claiming file\n"),
plugin_error_plugin ());
if (input->fd != -1