+2018-02-19 Alan Modra <amodra@gmail.com>
+
+ * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
+ * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
+ * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
+ * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
+ * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
+ * reloc.c: Replace use of %R and %T in format strings passed to
+ einfo and friends by %pR and %pT.
+
2018-02-19 Alan Modra <amodra@gmail.com>
* bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+ (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
sec->owner, h->root.root.string, sec);
/* Not an error, just cut short the traversal. */
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+ (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
sec->owner, eh->root.root.string, sec);
/* Not an error, just cut short the traversal. */
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+ (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
sec->owner, h->root.root.string, sec);
/* Not an error, just cut short the traversal. */
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+ (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
sec->owner, h->root.root.string, sec);
/* Not an error, just cut short the traversal. */
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+ (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
sec->owner, h->root.root.string, sec);
/* Not an error, just cut short the traversal. */
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+ (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
sec->owner, h->root.root.string, sec);
/* Not an error, just cut short the traversal. */
message instead. */
link_info->callbacks->einfo
/* xgettext:c-format */
- (_("%X%P: %pB(%pA): relocation \"%R\" goes out of range\n"),
+ (_("%X%P: %pB(%pA): relocation \"%pR\" goes out of range\n"),
abfd, input_section, * parent);
goto error_return;
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+ (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
sec->owner, h->root.root.string, sec);
/* Not an error, just cut short the traversal. */
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+ (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
sec->owner, h->root.root.string, sec);
/* Not an error, just cut short the traversal. */
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+ (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
sec->owner, h->root.root.string, sec);
/* Not an error, just cut short the traversal. */
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+ (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
sec->owner, h->root.root.string, sec);
/* Not an error, just cut short the traversal. */
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+ (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
sec->owner, h->root.root.string, sec);
/* Not an error, just cut short the traversal. */
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+ (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
sec->owner, h->root.root.string, sec);
/* Not an error, just cut short the traversal. */
sections. Allow them to proceed, but warn that this might
break at runtime. */
info->callbacks->einfo
- (_("%P: copy reloc against `%T' requires lazy plt linking; "
+ (_("%P: copy reloc against `%pT' requires lazy plt linking; "
"avoid setting LD_BIND_NOW=1 or upgrade gcc\n"),
h->root.root.string);
}
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+ (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
sec->owner, h->root.root.string, sec);
/* Not an error, just cut short the traversal. */
if (strcmp (opd->name, ".opd") != 0
|| opd->reloc_count != 0)
{
- info->callbacks->einfo (_("%P: cannot find opd entry toc for `%T'\n"),
+ info->callbacks->einfo (_("%P: cannot find opd entry toc for `%pT'\n"),
stub_entry->h->elf.root.root.string);
bfd_set_error (bfd_error_bad_value);
return (bfd_vma) -1;
if (off + 0x80008000 > 0xffffffff || (off & 7) != 0)
{
info->callbacks->einfo
- (_("%P: linkage table error against `%T'\n"),
+ (_("%P: linkage table error against `%pT'\n"),
stub_entry->root.string);
bfd_set_error (bfd_error_bad_value);
htab->stub_error = TRUE;
{
info->callbacks->einfo
/* xgettext:c-format */
- (_("%P: linkage table error against `%T'\n"),
+ (_("%P: linkage table error against `%pT'\n"),
stub_entry->h != NULL
? stub_entry->h->elf.root.root.string
: "<local sym>");
if (off + 0x80008000 > 0xffffffff || (off & 3) != 0)
{
info->callbacks->einfo
- (_("%P: linkage table error against `%T'\n"),
+ (_("%P: linkage table error against `%pT'\n"),
h->root.root.string);
bfd_set_error (bfd_error_bad_value);
htab->stub_error = TRUE;
info->callbacks->einfo
(!IS_PPC64_TLS_RELOC (r_type)
/* xgettext:c-format */
- ? _("%H: %s used with TLS symbol `%T'\n")
+ ? _("%H: %s used with TLS symbol `%pT'\n")
/* xgettext:c-format */
- : _("%H: %s used with non-TLS symbol `%T'\n"),
+ : _("%H: %s used with non-TLS symbol `%pT'\n"),
input_bfd, input_section, rel->r_offset,
ppc64_elf_howto_table[r_type]->name,
sym_name);
|| stub_entry->stub_type == ppc_stub_plt_call_r2save)
info->callbacks->einfo
/* xgettext:c-format */
- (_("%H: call to `%T' lacks nop, can't restore toc; "
+ (_("%H: call to `%pT' lacks nop, can't restore toc; "
"recompile with -fPIC\n"),
input_bfd, input_section, rel->r_offset, sym_name);
else
info->callbacks->einfo
/* xgettext:c-format */
- (_("%H: call to `%T' lacks nop, can't restore toc; "
+ (_("%H: call to `%pT' lacks nop, can't restore toc; "
"(-mcmodel=small toc adjust stub)\n"),
input_bfd, input_section, rel->r_offset, sym_name);
default:
info->callbacks->einfo
/* xgettext:c-format */
- (_("%P: %pB: unknown relocation type %d for `%T'\n"),
+ (_("%P: %pB: unknown relocation type %d for `%pT'\n"),
input_bfd, (int) r_type, sym_name);
bfd_set_error (bfd_error_bad_value);
info->callbacks->einfo
/* xgettext:c-format */
(_("%H: %s for indirect "
- "function `%T' unsupported\n"),
+ "function `%pT' unsupported\n"),
input_bfd, input_section, rel->r_offset,
ppc64_elf_howto_table[r_type]->name,
sym_name);
info->callbacks->einfo
/* xgettext:c-format */
- (_("%P: %pB: %s is not supported for `%T'\n"),
+ (_("%P: %pB: %s is not supported for `%pT'\n"),
input_bfd,
ppc64_elf_howto_table[r_type]->name, sym_name);
{
info->callbacks->einfo
/* xgettext:c-format */
- (_("%H: unresolvable %s against `%T'\n"),
+ (_("%H: unresolvable %s against `%pT'\n"),
input_bfd, input_section, rel->r_offset,
howto->name,
h->elf.root.root.string);
{
info->callbacks->einfo
/* xgettext:c-format */
- (_("%H: %s against `%T': error %d\n"),
+ (_("%H: %s against `%pT': error %d\n"),
input_bfd, input_section, rel->r_offset,
reloc_name, sym_name, (int) r);
ret = FALSE;
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+ (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
sec->owner, h->root.root.string, sec);
/* Not an error, just cut short the traversal. */
|| (info->extern_protected_data < 0
&& !get_elf_backend_data (dynbss->owner)->extern_protected_data)))
info->callbacks->einfo
- (_("%P: copy reloc against protected `%T' is dangerous\n"),
+ (_("%P: copy reloc against protected `%pT' is dangerous\n"),
h->root.root.string);
return TRUE;
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+ (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
sec->owner, h->root.root.string, sec);
/* Not an error, just cut short the traversal. */
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+ (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
sec->owner, h->root.root.string, sec);
/* Not an error, just cut short the traversal. */
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+ (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
sec->owner, h->root.root.string, sec);
/* Not an error, just cut short the traversal. */
info->flags |= DF_TEXTREL;
info->callbacks->minfo
- (_("%pB: dynamic relocation against `%T' in read-only section `%pA'\n"),
+ (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
sec->owner, h->root.root.string, sec);
/* Not an error, just cut short the traversal. */
info->flags |= DF_TEXTREL;
/* xgettext:c-format */
- info->callbacks->minfo (_("%pB: dynamic relocation against `%T' "
+ info->callbacks->minfo (_("%pB: dynamic relocation against `%pT' "
"in read-only section `%pA'\n"),
sec->owner, h->root.root.string, sec);
message instead. */
link_info->callbacks->einfo
/* xgettext:c-format */
- (_("%X%P: %pB(%pA): relocation \"%R\" goes out of range\n"),
+ (_("%X%P: %pB(%pA): relocation \"%pR\" goes out of range\n"),
abfd, input_section, * parent);
goto error_return;
Do not abort. Issue an error message instead. */
link_info->callbacks->einfo
/* xgettext:c-format */
- (_("%X%P: %pB(%pA): relocation \"%R\" is not supported\n"),
+ (_("%X%P: %pB(%pA): relocation \"%pR\" is not supported\n"),
abfd, input_section, * parent);
goto error_return;
Report unexpected results, without aborting. */
link_info->callbacks->einfo
/* xgettext:c-format */
- (_("%X%P: %pB(%pA): relocation \"%R\" returns an unrecognized value %x\n"),
+ (_("%X%P: %pB(%pA): relocation \"%pR\" returns an unrecognized value %x\n"),
abfd, input_section, * parent, r);
break;
}
+2018-02-19 Alan Modra <amodra@gmail.com>
+
+ * ldmisc.c (vfinfo) Handle %pI, %pR, %pS and %pT in place of
+ %I, %R, %S and %T.
+ * ldcref.c, * ldctor.c, * ldemul.c, * ldexp.c, * ldgram.y,
+ * ldlang.c, * ldlex.l, * ldmain.c, * ldmisc.c, * pe-dll.c,
+ * emultempl/sh64elf.em: Replace use of of %I, %R, %S and %T in
+ format strings passed to einfo and friends by %pI, %pR, %pS and %pT.
+
2018-02-19 Alan Modra <amodra@gmail.com>
* ldmisc.c (vfinfo): Handle %pA and %pB in place of %A and %B.
= bfd_get_section_by_name (f->the_bfd,
SH64_CRANGES_SECTION_NAME);
if (input_cranges != NULL)
- einfo (" %I\n", f);
+ einfo (" %pI\n", f);
}
}
& (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED))
{
einfo (_("%P: Sorry, turning off relaxing: SHmedia sections present.\n"));
- einfo (" %I\n", f);
+ einfo (" %pI\n", f);
DISABLE_RELAXATION;
goto done_scanning_shmedia_sections;
}
hl = bfd_link_hash_lookup (link_info.hash, h->root.string, FALSE,
FALSE, TRUE);
if (hl == NULL)
- einfo (_("%P: symbol `%T' missing from main hash table\n"),
+ einfo (_("%P: symbol `%pT' missing from main hash table\n"),
h->root.string);
else
{
FALSE, TRUE);
if (hl == NULL)
{
- einfo (_("%P: symbol `%T' missing from main hash table\n"),
+ einfo (_("%P: symbol `%pT' missing from main hash table\n"),
h->root.string);
return TRUE;
}
in OUTSECNAME. This reloc is from a section which is
mapped into a section from which references to OUTSECNAME
are prohibited. We must report an error. */
- einfo (_("%X%C: prohibited cross reference from %s to `%T' in %s\n"),
+ einfo (_("%X%C: prohibited cross reference from %s to `%pT' in %s\n"),
abfd, sec, q->address, outsecname,
bfd_asymbol_name (*q->sym_ptr_ptr), outdefsecname);
}
}
if (e->name != NULL)
- minfo ("%T\n", e->name);
+ minfo ("%pT\n", e->name);
else
minfo ("%G\n", e->section->owner, e->section, e->value);
}
void
syslib_default (char *ignore ATTRIBUTE_UNUSED)
{
- info_msg (_("%S SYSLIB ignored\n"), NULL);
+ info_msg (_("%pS SYSLIB ignored\n"), NULL);
}
void
hll_default (char *ignore ATTRIBUTE_UNUSED)
{
- info_msg (_("%S HLL ignored\n"), NULL);
+ info_msg (_("%pS HLL ignored\n"), NULL);
}
ld_emulation_xfer_type *ld_emulations[] = { EMULATION_LIST };
expld.result.value = ((bfd_signed_vma) lhs.value
% (bfd_signed_vma) expld.result.value);
else if (expld.phase != lang_mark_phase_enum)
- einfo (_("%F%S %% by zero\n"), tree->binary.rhs);
+ einfo (_("%F%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%S / by zero\n"), tree->binary.rhs);
+ einfo (_("%F%pS / by zero\n"), tree->binary.rhs);
arith_result_section (&lhs);
break;
if (expld.phase <= lang_mark_phase_enum)
new_rel (h->u.def.value, h->u.def.section);
else
- einfo (_("%X%S: unresolvable symbol `%s'"
+ einfo (_("%X%pS: unresolvable symbol `%s'"
" referenced in expression\n"),
tree, tree->name.name);
}
else if (expld.phase == lang_final_phase_enum
|| (expld.phase != lang_mark_phase_enum
&& expld.assigning_to_dot))
- einfo (_("%F%S: undefined symbol `%s'"
+ einfo (_("%F%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%S: undefined section `%s'"
+ einfo (_("%F%pS: undefined section `%s'"
" referenced in expression\n"),
tree, tree->name.name);
}
if (os == NULL)
{
if (expld.phase == lang_final_phase_enum)
- einfo (_("%F%S: undefined section `%s'"
+ einfo (_("%F%pS: undefined section `%s'"
" referenced in expression\n"),
tree, tree->name.name);
}
if (os == NULL)
{
if (expld.phase == lang_final_phase_enum)
- einfo (_("%F%S: undefined section `%s'"
+ einfo (_("%F%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%S: undefined MEMORY region `%s'"
+ einfo (_("%F%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%S: undefined MEMORY region `%s'"
+ einfo (_("%F%pS: undefined MEMORY region `%s'"
" referenced in expression\n"),
tree, tree->name.name);
}
else if (strcmp (tree->name.name, "COMMONPAGESIZE") == 0)
new_number (config.commonpagesize);
else
- einfo (_("%F%S: unknown constant `%s' referenced in expression\n"),
+ einfo (_("%F%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%S can not PROVIDE assignment to"
+ einfo (_("%F%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%S invalid assignment to"
+ einfo (_("%F%pS invalid assignment to"
" location counter\n"), tree);
}
else if (expld.dotp == NULL)
- einfo (_("%F%S assignment to location counter"
+ einfo (_("%F%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%S cannot move location counter backwards"
+ einfo (_("%F%pS cannot move location counter backwards"
" (from %V to %V)\n"),
tree, expld.dot, nextdot);
else
if (expld.result.valid_p)
return expld.result.value;
else if (name != NULL && expld.phase != lang_mark_phase_enum)
- einfo (_("%F%S: nonconstant expression for %s\n"),
+ einfo (_("%F%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%S: nonconstant expression for %s\n"),
+ einfo (_("%F%pS: nonconstant expression for %s\n"),
tree, name);
return def;
}
}
else if (name != NULL && expld.phase != lang_mark_phase_enum)
{
- einfo (_("%F%S: nonconstant expression for %s\n"),
+ einfo (_("%F%pS: nonconstant expression for %s\n"),
tree, name);
}
}
else
{
einfo (_("\
-%X%P:%S: unknown phdr type `%s' (try integer literal)\n"),
+%X%P:%pS: unknown phdr type `%s' (try integer literal)\n"),
NULL, s);
$$ = exp_intop (0);
}
else if (strcmp ($1, "FLAGS") == 0 && $2 != NULL)
$$.flags = $2;
else
- einfo (_("%X%P:%S: PHDRS syntax error at `%s'\n"),
+ einfo (_("%X%P:%pS: PHDRS syntax error at `%s'\n"),
NULL, $1);
}
| AT '(' exp ')' phdr_qualifiers
einfo (_("%P:%s: file format not recognized; treating as linker script\n"),
ldlex_filename ());
if (error_index > 0 && error_index < ERROR_NAME_MAX)
- einfo ("%P%F:%S: %s in %s\n", NULL, arg, error_names[error_index - 1]);
+ einfo ("%P%F:%pS: %s in %s\n", NULL, arg, error_names[error_index - 1]);
else
- einfo ("%P%F:%S: %s\n", NULL, arg);
+ einfo ("%P%F:%pS: %s\n", NULL, arg);
}
if (strcmp (n->name, name) == 0)
{
if (create)
- einfo (_("%P:%S: warning: redeclaration of memory region `%s'\n"),
+ einfo (_("%P:%pS: warning: redeclaration of memory region `%s'\n"),
NULL, name);
return r;
}
if (!create && strcmp (name, DEFAULT_MEMORY_REGION))
- einfo (_("%P:%S: warning: memory region `%s' not declared\n"),
+ einfo (_("%P:%pS: warning: memory region `%s' not declared\n"),
NULL, name);
new_region = (lang_memory_region_type *)
the default memory region. */
if (strcmp (region_name, DEFAULT_MEMORY_REGION) == 0
|| strcmp (alias, DEFAULT_MEMORY_REGION) == 0)
- einfo (_("%F%P:%S: error: alias for default memory region\n"), NULL);
+ einfo (_("%F%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:%S: error: redefinition of memory region "
+ einfo (_("%F%P:%pS: error: redefinition of memory region "
"alias `%s'\n"),
NULL, alias);
}
/* Check if the target region exists. */
if (region == NULL)
- einfo (_("%F%P:%S: error: memory region `%s' "
+ einfo (_("%F%P:%pS: error: memory region `%s' "
"for alias `%s' does not exist\n"),
NULL, region_name, alias);
if (m->ref != NULL)
minfo ("%pB ", m->ref);
- minfo ("(%T)\n", m->name);
+ minfo ("(%pT)\n", m->name);
}
}
if (!entry->flags.reload)
ldlang_add_file (entry);
if (trace_files || verbose)
- info_msg ("%I\n", entry);
+ info_msg ("%pI\n", entry);
break;
case bfd_archive:
+ hash_entry->u.def.section->output_offset
+ hash_entry->u.def.section->output_section->vma));
- minfo (" %T\n", hash_entry->root.string);
+ minfo (" %pT\n", hash_entry->root.string);
}
return TRUE;
dot += expld.result.section->vma;
}
else if (expld.phase != lang_mark_phase_enum)
- einfo (_("%F%S: non constant or forward reference"
+ einfo (_("%F%pS: non constant or forward reference"
" address expression for section %s\n"),
os->addr_tree, os->name);
}
section = h->u.c.p->section;
if (!bfd_define_common_symbol (link_info.output_bfd, &link_info, h))
- einfo (_("%P%F: Could not define common symbol `%T': %E\n"),
+ einfo (_("%P%F: Could not define common symbol `%pT': %E\n"),
h->root.string);
if (config.map_file != NULL)
os->align_lma_with_input = align_with_input == ALIGN_WITH_INPUT;
if (os->align_lma_with_input && align != NULL)
- einfo (_("%F%P:%S: error: align with input and explicit align specified\n"),
+ einfo (_("%F%P:%pS: error: align with input and explicit align specified\n"),
NULL);
os->subsection_alignment =
*region = lang_memory_region_lookup (memspec, FALSE);
if (have_lma && lma_memspec != 0)
- einfo (_("%X%P:%S: section has both a load address and a load region\n"),
+ einfo (_("%X%P:%pS: section has both a load address and a load region\n"),
NULL);
}
&& (*pp)->type == 1
&& !((*pp)->filehdr || (*pp)->phdrs))
{
- einfo (_("%X%P:%S: PHDRS and FILEHDR are not supported"
+ einfo (_("%X%P:%pS: PHDRS and FILEHDR are not supported"
" when prior PT_LOAD headers lack them\n"), NULL);
hdrs = FALSE;
}
what = buf;
}
- einfo (_("%P:%S: ignoring invalid character `%s'%s\n"), NULL, what, where);
+ einfo (_("%P:%pS: ignoring invalid character `%s'%s\n"), NULL, what, where);
}
/* Don't claim new IR symbols after all IR symbols have
been claimed. */
if (trace_files || verbose)
- info_msg ("%I: no new IR symbols to claimi\n",
+ info_msg ("%pI: no new IR symbols to claimi\n",
&orig_input);
input->flags.claimed = 0;
return FALSE;
if (from != NULL)
minfo ("%pB ", from);
if (h != NULL)
- minfo ("(%T)\n", h->root.string);
+ minfo ("(%pT)\n", h->root.string);
else
minfo ("(%s)\n", name);
}
if (trace_files || verbose)
- info_msg ("%I\n", &orig_input);
+ info_msg ("%pI\n", &orig_input);
return TRUE;
}
nval = oval;
obfd = NULL;
}
- einfo (_("%X%C: multiple definition of `%T'\n"),
+ einfo (_("%X%C: multiple definition of `%pT'\n"),
nbfd, nsec, nval, name);
if (obfd != NULL)
einfo (_("%D: first defined here\n"), obfd, osec, oval);
|| ntype == bfd_link_hash_indirect)
{
ASSERT (otype == bfd_link_hash_common);
- einfo (_("%pB: warning: definition of `%T' overriding common\n"),
+ einfo (_("%pB: warning: definition of `%pT' overriding common\n"),
nbfd, name);
if (obfd != NULL)
einfo (_("%pB: warning: common is here\n"), obfd);
|| otype == bfd_link_hash_indirect)
{
ASSERT (ntype == bfd_link_hash_common);
- einfo (_("%pB: warning: common of `%T' overridden by definition\n"),
+ einfo (_("%pB: warning: common of `%pT' overridden by definition\n"),
nbfd, name);
if (obfd != NULL)
einfo (_("%pB: warning: defined here\n"), obfd);
ASSERT (otype == bfd_link_hash_common && ntype == bfd_link_hash_common);
if (osize > nsize)
{
- einfo (_("%pB: warning: common of `%T' overridden by larger common\n"),
+ einfo (_("%pB: warning: common of `%pT' overridden by larger common\n"),
nbfd, name);
if (obfd != NULL)
einfo (_("%pB: warning: larger common is here\n"), obfd);
}
else if (nsize > osize)
{
- einfo (_("%pB: warning: common of `%T' overriding smaller common\n"),
+ einfo (_("%pB: warning: common of `%pT' overriding smaller common\n"),
nbfd, name);
if (obfd != NULL)
einfo (_("%pB: warning: smaller common is here\n"), obfd);
}
else
{
- einfo (_("%pB: warning: multiple common of `%T'\n"), nbfd, name);
+ einfo (_("%pB: warning: multiple common of `%pT'\n"), nbfd, name);
if (obfd != NULL)
einfo (_("%pB: warning: previous common is here\n"), obfd);
}
if (error_count < MAX_ERRORS_IN_A_ROW)
{
if (error)
- einfo (_("%X%C: undefined reference to `%T'\n"),
+ einfo (_("%X%C: undefined reference to `%pT'\n"),
abfd, section, address, name);
else
- einfo (_("%C: warning: undefined reference to `%T'\n"),
+ einfo (_("%C: warning: undefined reference to `%pT'\n"),
abfd, section, address, name);
}
else if (error_count == MAX_ERRORS_IN_A_ROW)
{
if (error)
- einfo (_("%X%D: more undefined references to `%T' follow\n"),
+ einfo (_("%X%D: more undefined references to `%pT' follow\n"),
abfd, section, address, name);
else
- einfo (_("%D: warning: more undefined references to `%T' follow\n"),
+ einfo (_("%D: warning: more undefined references to `%pT' follow\n"),
abfd, section, address, name);
}
else if (error)
if (error_count < MAX_ERRORS_IN_A_ROW)
{
if (error)
- einfo (_("%X%pB: undefined reference to `%T'\n"),
+ einfo (_("%X%pB: undefined reference to `%pT'\n"),
abfd, name);
else
- einfo (_("%pB: warning: undefined reference to `%T'\n"),
+ einfo (_("%pB: warning: undefined reference to `%pT'\n"),
abfd, name);
}
else if (error_count == MAX_ERRORS_IN_A_ROW)
{
if (error)
- einfo (_("%X%pB: more undefined references to `%T' follow\n"),
+ einfo (_("%X%pB: more undefined references to `%pT' follow\n"),
abfd, name);
else
- einfo (_("%pB: warning: more undefined references to `%T' follow\n"),
+ einfo (_("%pB: warning: more undefined references to `%pT' follow\n"),
abfd, name);
}
else if (error)
case bfd_link_hash_undefined:
case bfd_link_hash_undefweak:
einfo (_(" relocation truncated to fit: "
- "%s against undefined symbol `%T'"),
+ "%s against undefined symbol `%pT'"),
reloc_name, entry->root.string);
break;
case bfd_link_hash_defined:
case bfd_link_hash_defweak:
einfo (_(" relocation truncated to fit: "
- "%s against symbol `%T' defined in %pA section in %pB"),
+ "%s against symbol `%pT' defined in %pA section in %pB"),
reloc_name, entry->root.string,
entry->u.def.section,
entry->u.def.section == bfd_abs_section_ptr
}
}
else
- einfo (_(" relocation truncated to fit: %s against `%T'"),
+ einfo (_(" relocation truncated to fit: %s against `%pT'"),
reloc_name, name);
if (addend != 0)
einfo ("+%v", addend);
asection *section,
bfd_vma address)
{
- einfo (_("%X%H: reloc refers to symbol `%T' which is not being output\n"),
+ einfo (_("%X%H: reloc refers to symbol `%pT' which is not being output\n"),
abfd, section, address, name);
}
%F error is fatal
%G like %D, but only function name
%H like %C but in addition emit section+offset
- %I filename from a lang_input_statement_type
%P print program name
- %R info about a relent
- %S print script file and linenumber from etree_type.
- %T symbol name
%V hex bfd_vma
%W hex bfd_vma with 0x with no leading zeros taking up 8 spaces
%X no object output, fail return
%p native (host) void* pointer, like printf
%pA section name from a section
%pB filename from a bfd
+ %pI filename from a lang_input_statement_type
+ %pR info about a relent
+ %pS print script file and linenumber from etree_type.
+ %pT symbol name
%s arbitrary string, like printf
%u integer, like printf
%v hex bfd_vma, no leading zeros
arg_type = Vma;
break;
- case 'T':
- case 'I':
- case 'S':
- case 'R':
case 's':
arg_type = Ptr;
break;
case 'p':
- if (*scan == 'A' || *scan == 'B')
+ if (*scan == 'A' || *scan == 'B' || *scan == 'I'
+ || *scan == 'R' || *scan == 'S' || *scan == 'T')
scan++;
arg_type = Ptr;
break;
}
break;
- case 'T':
- /* Symbol name. */
- {
- const char *name = (const char *) args[arg_no].p;
- ++arg_count;
- if (name == NULL || *name == 0)
- {
- fprintf (fp, _("no symbol"));
- break;
- }
- else if (demangling)
- {
- char *demangled;
-
- demangled = bfd_demangle (link_info.output_bfd, name,
- DMGL_ANSI | DMGL_PARAMS);
- if (demangled != NULL)
- {
- fprintf (fp, "%s", demangled);
- free (demangled);
- break;
- }
- }
- fprintf (fp, "%s", name);
- }
- break;
-
case 'F':
/* Error is fatal. */
fatal = TRUE;
fprintf (fp, "%s", bfd_errmsg (bfd_get_error ()));
break;
- case 'I':
- /* filename from a lang_input_statement_type */
- {
- lang_input_statement_type *i;
-
- i = (lang_input_statement_type *) args[arg_no].p;
- ++arg_count;
- if (i->the_bfd->my_archive != NULL
- && !bfd_is_thin_archive (i->the_bfd->my_archive))
- fprintf (fp, "(%s)",
- bfd_get_filename (i->the_bfd->my_archive));
- fprintf (fp, "%s", i->local_sym_name);
- if ((i->the_bfd->my_archive == NULL
- || bfd_is_thin_archive (i->the_bfd->my_archive))
- && filename_cmp (i->local_sym_name, i->filename) != 0)
- fprintf (fp, " (%s)", i->filename);
- }
- break;
-
- case 'S':
- /* Print script file and linenumber. */
- {
- etree_type node;
- etree_type *tp = (etree_type *) args[arg_no].p;
- ++arg_count;
- if (tp == NULL)
- {
- tp = &node;
- tp->type.filename = ldlex_filename ();
- tp->type.lineno = lineno;
- }
- if (tp->type.filename != NULL)
- fprintf (fp, "%s:%u", tp->type.filename, tp->type.lineno);
- }
- break;
-
- case 'R':
- /* Print all that's interesting about a relent. */
- {
- arelent *relent = (arelent *) args[arg_no].p;
- ++arg_count;
- lfinfo (fp, "%s+0x%v (type %s)",
- (*(relent->sym_ptr_ptr))->name,
- relent->addend,
- relent->howto->name);
- }
- break;
-
case 'C':
case 'D':
case 'G':
&& filename_cmp (last_file, filename) != 0)
|| strcmp (last_function, functionname) != 0)
{
- lfinfo (fp, _("%pB: In function `%T':\n"),
+ lfinfo (fp, _("%pB: In function `%pT':\n"),
abfd, functionname);
last_bfd = abfd;
done = fmt[-1] != 'H';
if (functionname != NULL && fmt[-1] == 'G')
- lfinfo (fp, "%T", functionname);
+ lfinfo (fp, "%pT", functionname);
else if (filename != NULL && linenumber != 0)
fprintf (fp, "%u%s", linenumber, done ? "" : ":");
else
else
fprintf (fp, "%s", abfd->filename);
}
+ else if (*fmt == 'I')
+ {
+ /* filename from a lang_input_statement_type */
+ lang_input_statement_type *i;
+
+ fmt++;
+ i = (lang_input_statement_type *) args[arg_no].p;
+ ++arg_count;
+ if (i->the_bfd->my_archive != NULL
+ && !bfd_is_thin_archive (i->the_bfd->my_archive))
+ fprintf (fp, "(%s)",
+ bfd_get_filename (i->the_bfd->my_archive));
+ fprintf (fp, "%s", i->local_sym_name);
+ if ((i->the_bfd->my_archive == NULL
+ || bfd_is_thin_archive (i->the_bfd->my_archive))
+ && filename_cmp (i->local_sym_name, i->filename) != 0)
+ fprintf (fp, " (%s)", i->filename);
+ }
+ else if (*fmt == 'R')
+ {
+ /* Print all that's interesting about a relent. */
+ arelent *relent = (arelent *) args[arg_no].p;
+
+ fmt++;
+ ++arg_count;
+ lfinfo (fp, "%s+0x%v (type %s)",
+ (*(relent->sym_ptr_ptr))->name,
+ relent->addend,
+ relent->howto->name);
+ }
+ else if (*fmt == 'S')
+ {
+ /* Print script file and linenumber. */
+ etree_type node;
+ etree_type *tp = (etree_type *) args[arg_no].p;
+
+ fmt++;
+ ++arg_count;
+ if (tp == NULL)
+ {
+ tp = &node;
+ tp->type.filename = ldlex_filename ();
+ tp->type.lineno = lineno;
+ }
+ if (tp->type.filename != NULL)
+ fprintf (fp, "%s:%u", tp->type.filename, tp->type.lineno);
+ }
+ else if (*fmt == 'T')
+ {
+ /* Symbol name. */
+ const char *name = (const char *) args[arg_no].p;
+
+ fmt++;
+ ++arg_count;
+ if (name == NULL || *name == 0)
+ {
+ fprintf (fp, _("no symbol"));
+ break;
+ }
+ else if (demangling)
+ {
+ char *demangled;
+
+ demangled = bfd_demangle (link_info.output_bfd, name,
+ DMGL_ANSI | DMGL_PARAMS);
+ if (demangled != NULL)
+ {
+ fprintf (fp, "%s", demangled);
+ free (demangled);
+ break;
+ }
+ }
+ fprintf (fp, "%s", name);
+ }
else
{
/* native (host) void* pointer, like printf */
runtime_pseudo_relocs_created++;
}
else if (addend != 0)
- einfo (_("%P%X%C: variable '%T' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.\n"),
+ einfo (_("%P%X%C: variable '%pT' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.\n"),
s->owner, s, rel->address, sym->name);
}