BFD messages

bfd/
	* archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
	* syms.c: Standardize error/warning messages.
binutils/
	* testsuite/binutils-all/mips/mips-reginfo-n32.d,
	* testsuite/binutils-all/mips/mips-reginfo.d: Update.
gas/
	* testsuite/gas/mips/reginfo-2.l: Update.
ld/
	* testsuite/ld-arm/cmse-implib-errors.out,
	* testsuite/ld-arm/cmse-new-earlier-later-implib.out,
	* testsuite/ld-arm/cmse-new-implib-not-sg-in-implib.out,
	* testsuite/ld-arm/cmse-new-wrong-implib.out,
	* testsuite/ld-arm/cmse-veneers-no-gnu_sgstubs.out,
	* testsuite/ld-arm/cmse-veneers-wrong-entryfct.out,
	* testsuite/ld-cris/badgotr1.d,
	* testsuite/ld-cris/tls-err-24.d,
	* testsuite/ld-cris/tls-err-25.d,
	* testsuite/ld-cris/tls-err-26.d,
	* testsuite/ld-cris/tls-err-27.d,
	* testsuite/ld-cris/tls-err-28.d,
	* testsuite/ld-cris/tls-err-40.d,
	* testsuite/ld-cris/tls-err-44.d,
	* testsuite/ld-cris/tls-err-48.d,
	* testsuite/ld-cris/tls-err-52.d,
	* testsuite/ld-cris/tls-err-53.d,
	* testsuite/ld-cris/tls-err-55.d,
	* testsuite/ld-cris/tls-err-56.d,
	* testsuite/ld-cris/tls-err-62.d,
	* testsuite/ld-cris/tls-err-65.d,
	* testsuite/ld-cris/tls-err-77.d,
	* testsuite/ld-elf/empty-implib.out,
	* testsuite/ld-elf/indirect.exp: Update.
This commit is contained in:
Alan Modra 2018-02-21 13:09:29 +10:30
parent 59d08d6ce8
commit 6e05870c97
37 changed files with 96 additions and 55 deletions

View File

@ -1,3 +1,8 @@
2018-02-26 Alan Modra <amodra@gmail.com>
* archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
* syms.c: Standardize error/warning messages.
2018-02-26 Alan Modra <amodra@gmail.com>
* aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,

View File

@ -2338,7 +2338,7 @@ _bfd_write_archive_contents (bfd *arch)
if (bfd_update_armap_timestamp (arch))
break;
_bfd_error_handler
(_("Warning: writing archive was slow: rewriting timestamp\n"));
(_("warning: writing archive was slow: rewriting timestamp"));
}
while (++tries < 6);
}

View File

@ -451,28 +451,28 @@ static bfd_error_type input_error = bfd_error_no_error;
const char *const bfd_errmsgs[] =
{
N_("No error"),
N_("System call error"),
N_("Invalid bfd target"),
N_("File in wrong format"),
N_("Archive object file in wrong format"),
N_("Invalid operation"),
N_("Memory exhausted"),
N_("No symbols"),
N_("Archive has no index; run ranlib to add one"),
N_("No more archived files"),
N_("Malformed archive"),
N_("no error"),
N_("system call error"),
N_("invalid bfd target"),
N_("file in wrong format"),
N_("archive object file in wrong format"),
N_("invalid operation"),
N_("memory exhausted"),
N_("no symbols"),
N_("archive has no index; run ranlib to add one"),
N_("no more archived files"),
N_("malformed archive"),
N_("DSO missing from command line"),
N_("File format not recognized"),
N_("File format is ambiguous"),
N_("Section has no contents"),
N_("Nonrepresentable section on output"),
N_("Symbol needs debug section which does not exist"),
N_("Bad value"),
N_("File truncated"),
N_("File too big"),
N_("Error reading %s: %s"),
N_("#<Invalid error code>")
N_("file format not recognized"),
N_("file format is ambiguous"),
N_("section has no contents"),
N_("nonrepresentable section on output"),
N_("symbol needs debug section which does not exist"),
N_("bad value"),
N_("file truncated"),
N_("file too big"),
N_("error reading %s: %s"),
N_("#<invalid error code>")
};
/*

View File

@ -2545,7 +2545,7 @@ default_indirect_link_order (bfd *output_bfd,
difficult, and sometimes impossible. */
_bfd_error_handler
/* xgettext:c-format */
(_("Attempt to do relocatable link with %s input and %s output"),
(_("attempt to do relocatable link with %s input and %s output"),
bfd_get_target (input_bfd), bfd_get_target (output_bfd));
bfd_set_error (bfd_error_wrong_format);
return FALSE;

View File

@ -8140,7 +8140,7 @@ bfd_generic_lookup_section_flags (struct bfd_link_info *info ATTRIBUTE_UNUSED,
{
if (flaginfo != NULL)
{
_bfd_error_handler (_("INPUT_SECTION_FLAGS are not supported.\n"));
_bfd_error_handler (_("INPUT_SECTION_FLAGS are not supported"));
return FALSE;
}
return TRUE;
@ -8392,7 +8392,7 @@ _bfd_unrecognized_reloc (bfd * abfd, sec_ptr section, unsigned int r_type)
abfd, r_type, section);
/* PR 21803: Suggest the most likely cause of this error. */
_bfd_error_handler (_("Is this version of the linker - %s - out of date ?"),
_bfd_error_handler (_("is this version of the linker - %s - out of date ?"),
BFD_VERSION_STRING);
bfd_set_error (bfd_error_bad_value);

View File

@ -276,7 +276,7 @@ _bfd_link_section_stabs (bfd *abfd,
{
_bfd_error_handler
/* xgettext:c-format */
(_("%pB(%pA+%#lx): Stabs entry has invalid string index."),
(_("%pB(%pA+%#lx): stabs entry has invalid string index"),
abfd, stabsec, (long) (sym - stabbuf));
bfd_set_error (bfd_error_bad_value);
goto error_return;

View File

@ -1076,7 +1076,7 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
|| r->howto->dst_mask != 0xffffffff)
{
_bfd_error_handler
(_("Unsupported .stab relocation"));
(_("unsupported .stab relocation"));
bfd_set_error (bfd_error_invalid_operation);
if (reloc_vector != NULL)
free (reloc_vector);

View File

@ -3,6 +3,11 @@
* testsuite/binutils-all/mips/mips-reginfo-n32.d,
* testsuite/binutils-all/mips/mips-reginfo.d: Update.
2018-02-23 Alan Modra <amodra@gmail.com>
* testsuite/binutils-all/mips/mips-reginfo-n32.d,
* testsuite/binutils-all/mips/mips-reginfo.d: Update.
2018-02-20 Ronald Hoogenboom <hoogenboom30@zonnet.nl>
* doc/binutils.texi (objcopy): Add missing closing square

View File

@ -4,4 +4,4 @@
#objcopy: --rename-section .foo=.reginfo
#source: mips-reginfo.s
#error: \A[^\n]*: incorrect `\.reginfo' section size; expected 24, got 4\n
#error: [^\n]*: Bad value\Z
#error: [^\n]*: bad value\Z

View File

@ -3,4 +3,4 @@
#as: -32
#objcopy: --rename-section .foo=.reginfo
#error: \A[^\n]*: incorrect `\.reginfo' section size; expected 24, got 4\n
#error: [^\n]*: Bad value\Z
#error: [^\n]*: bad value\Z

View File

@ -2,6 +2,10 @@
* testsuite/gas/mips/reginfo-2.l: Update.
2018-02-23 Alan Modra <amodra@gmail.com>
* testsuite/gas/mips/reginfo-2.l: Update.
2018-02-23 Nick Clifton <nickc@redhat.com>
* doc/as.texinfo (Pseudo Ops): Add nodes for .dc, .dcb and .ds.

View File

@ -1,3 +1,3 @@
.*: incorrect `\.reginfo' section size; expected 24, got 28
.*: Assembler messages:
.*: Fatal error: can't close .*: Bad value
.*: Fatal error: can't close .*: bad value

View File

@ -1,3 +1,30 @@
2018-02-26 Alan Modra <amodra@gmail.com>
* testsuite/ld-arm/cmse-implib-errors.out,
* testsuite/ld-arm/cmse-new-earlier-later-implib.out,
* testsuite/ld-arm/cmse-new-implib-not-sg-in-implib.out,
* testsuite/ld-arm/cmse-new-wrong-implib.out,
* testsuite/ld-arm/cmse-veneers-no-gnu_sgstubs.out,
* testsuite/ld-arm/cmse-veneers-wrong-entryfct.out,
* testsuite/ld-cris/badgotr1.d,
* testsuite/ld-cris/tls-err-24.d,
* testsuite/ld-cris/tls-err-25.d,
* testsuite/ld-cris/tls-err-26.d,
* testsuite/ld-cris/tls-err-27.d,
* testsuite/ld-cris/tls-err-28.d,
* testsuite/ld-cris/tls-err-40.d,
* testsuite/ld-cris/tls-err-44.d,
* testsuite/ld-cris/tls-err-48.d,
* testsuite/ld-cris/tls-err-52.d,
* testsuite/ld-cris/tls-err-53.d,
* testsuite/ld-cris/tls-err-55.d,
* testsuite/ld-cris/tls-err-56.d,
* testsuite/ld-cris/tls-err-62.d,
* testsuite/ld-cris/tls-err-65.d,
* testsuite/ld-cris/tls-err-77.d,
* testsuite/ld-elf/empty-implib.out,
* testsuite/ld-elf/indirect.exp: Update.
2018-02-26 Alan Modra <amodra@gmail.com>
* testsuite/ld-aarch64/reloc-overflow-bad.d,

View File

@ -1,5 +1,5 @@
.*: .*: absent standard symbol `not_exported_fct2'
.*: .*: invalid special symbol `__acle_se_not_exported_pseudoentry_var'; it must be a global or weak function symbol
.*: .*: invalid standard symbol `not_exported_pseudoentry_var'; it must be a global or weak function symbol
.* cannot size stub section: Invalid operation
.* cannot size stub section: invalid operation
#...

View File

@ -1,3 +1,3 @@
.*: entry function `exported_entry_veneer3' disappeared from secure code
.*: start address of `.gnu.sgstubs' is different from previous link
.*: cannot size stub section: Invalid operation
.*: cannot size stub section: invalid operation

View File

@ -1,2 +1,2 @@
.*: --in-implib only supported for Secure Gateway import libraries
.*: cannot size stub section: Invalid operation
.*: cannot size stub section: invalid operation

View File

@ -1,3 +1,3 @@
.*: .*: visibility of symbol `exported_entry_veneer2' has changed
.*: `exported_entry_fct2' refers to a non entry function
.*: cannot size stub section: Invalid operation
.*: cannot size stub section: invalid operation

View File

@ -1,3 +1,3 @@
.*: no address assigned to the veneers output section .gnu.sgstubs
.*: cannot size stub section: Invalid operation
.*: cannot size stub section: invalid operation
#...

View File

@ -8,5 +8,5 @@
.*: .*: invalid standard symbol `obj_entry_veneer1'; it must be a global or weak function symbol
.*: .*: invalid special symbol `__acle_se_obj_entry_veneer2'; it must be a global or weak function symbol
.*: .*: `fake_entry_veneer2' and its special symbol are in different sections
.*: cannot size stub section: Invalid operation
.*: cannot size stub section: invalid operation
#...

View File

@ -2,7 +2,7 @@
#as: --pic --underscore --em=criself
#ld: -m crislinux -shared
#objdump: -dr
#error: \A[^\nc][^\n]*o: uses _-prefixed [^\nc]*\n[^\nc][^\n]* failed to merge [^\n]*\n[^\nc][^\n]* no GOT [^\n]*\n[^\nc][^\n]* Bad value\Z
#error: \A[^\nc][^\n]*o: uses _-prefixed [^\nc]*\n[^\nc][^\n]* failed to merge [^\n]*\n[^\nc][^\n]* no GOT [^\n]*\n[^\nc][^\n]* bad value\Z
# The error regex above is supposed to not match if we get a
# SEGV, in which case we'll see "child killed: segmentation

View File

@ -2,6 +2,6 @@
#source: tls-z.s
#as: --no-underscore --em=criself
#ld: --shared -m crislinux
#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*Invalid operation\Z
#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*invalid operation\Z
# Check that R_CRIS_16_TPREL in input to a DSO is flagged as an error.

View File

@ -2,6 +2,6 @@
#source: tls-z.s
#as: --no-underscore --em=criself
#ld: --shared -m crislinux
#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*Invalid operation\Z
#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*invalid operation\Z
# Check that R_CRIS_32_TPREL in input to a DSO is flagged as an error.

View File

@ -2,7 +2,7 @@
#source: tls-x.s
#as: --no-underscore --em=criself --pic
#ld: --shared -m crislinux
#error: \A[^\n]*\.o,[^\n]*mixup[^\n]*\n[^\n]*Bad value\Z
#error: \A[^\n]*\.o,[^\n]*mixup[^\n]*\n[^\n]*bad value\Z
# Check that R_CRIS_16_DTPREL on non-module-local symbol in input to a
# DSO is flagged as an error.

View File

@ -2,7 +2,7 @@
#source: tls-x.s
#as: --no-underscore --em=criself --pic
#ld: --shared -m crislinux
#error: \A[^\n]*\.o,[^\n]*mixup[^\n]*\n[^\n]*Bad value\Z
#error: \A[^\n]*\.o,[^\n]*mixup[^\n]*\n[^\n]*bad value\Z
# Check that R_CRIS_32_DTPREL on non-module-local symbol in input to a
# DSO is flagged as an error.

View File

@ -2,6 +2,6 @@
#source: tls-x.s
#as: --no-underscore --em=criself
#ld: --shared -m crislinux
#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*Invalid operation\Z
#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*invalid operation\Z
# Check that a R_CRIS_32_GD in input to a DSO is flagged as an error.

View File

@ -1,6 +1,6 @@
#source: tls-ld-6.s --pic
#as: --no-underscore --em=criself
#ld: -m crislinux --shared
#error: \A[^\n]*\.o[^\n]*undefined reference[^\n]*\n[^\n]*Bad value\Z
#error: \A[^\n]*\.o[^\n]*undefined reference[^\n]*\n[^\n]*bad value\Z
# Undefined reference for a R_CRIS_32_DTPREL in a DSO.

View File

@ -1,7 +1,7 @@
#source: tls-le-12.s
#as: --no-underscore --em=criself
#ld: -m crislinux --shared
#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*Invalid operation\Z
#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*invalid operation\Z
# Undefined reference for a R_CRIS_32_TPREL in a DSO (where it's
# invalid in the first place anyway, so we should see the same

View File

@ -1,6 +1,6 @@
#source: tls-ld-4.s --pic
#as: --no-underscore --em=criself
#ld: -m crislinux --shared
#error: \A[^\n]*\.o[^\n]*undefined reference[^\n]*\n[^\n]*Bad value\Z
#error: \A[^\n]*\.o[^\n]*undefined reference[^\n]*\n[^\n]*bad value\Z
# Undefined reference for a R_CRIS_16_DTPREL in a DSO.

View File

@ -1,7 +1,7 @@
#source: tls-le-12s.s
#as: --no-underscore --em=criself
#ld: -m crislinux --shared
#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*Invalid operation\Z
#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*invalid operation\Z
# Undefined reference for a R_CRIS_16_TPREL in a DSO (where it's
# invalid in the first place anyway, so we should see the same

View File

@ -2,6 +2,6 @@
#source: tls-ld-4.s
#as: --no-underscore --em=criself --pic
#ld: -m crislinux tmpdir/tls-dso-xz-1.so
#error: \A[^\n]*\.o,[^\n]*mixup[^\n]*\n[^\n]*Bad value\Z
#error: \A[^\n]*\.o,[^\n]*mixup[^\n]*\n[^\n]*bad value\Z
# R_CRIS_16_DTPREL in executable against symbol from DSO.

View File

@ -1,6 +1,6 @@
#source: tls-err-55.s
#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
#ld: --shared -m crislinux
#error: \A[^\n]*\.o[^\n]*relocation R_CRIS_32_GOT_GD with non-zero addend 42 against symbol `tls128'[^\n]*\n[^\n]*Bad value\Z
#error: \A[^\n]*\.o[^\n]*relocation R_CRIS_32_GOT_GD with non-zero addend 42 against symbol `tls128'[^\n]*\n[^\n]*bad value\Z
# Check that non-zero addend on a R_CRIS_32_GOT_GD is flagged as an error.

View File

@ -1,7 +1,7 @@
#source: tls-err-56.s
#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
#ld: --shared -m crislinux
#error: \A[^\n]*\.o[^\n]*relocation R_CRIS_32_GOT_GD with non-zero addend 42 against symbol `tls128'[^\n]*\n[^\n]*Bad value\Z
#error: \A[^\n]*\.o[^\n]*relocation R_CRIS_32_GOT_GD with non-zero addend 42 against symbol `tls128'[^\n]*\n[^\n]*bad value\Z
# Check that non-zero addend on a R_CRIS_32_GOT_GD is flagged as an error.
# The difference to tls-err-55.d is that this one refers to a local symbol.

View File

@ -1,7 +1,7 @@
#source: tls-err-62.s
#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
#ld: --shared -m crislinux
#error: \A[^\n]*\.o[^\n]*relocation R_CRIS_32_GOT_TPREL with non-zero addend 42 against symbol `tls128'[^\n]*\n[^\n]*Bad value\Z
#error: \A[^\n]*\.o[^\n]*relocation R_CRIS_32_GOT_TPREL with non-zero addend 42 against symbol `tls128'[^\n]*\n[^\n]*bad value\Z
# Check that non-zero addend on a R_CRIS_32_GOT_TPREL is flagged as an
# error, local symbol.

View File

@ -2,6 +2,6 @@
#source: tls-le-12s.s
#as: --no-underscore --em=criself
#ld: -m crislinux tmpdir/tls-dso-xz-1.so
#error: \A[^\n]*\.o,[^\n]*mixup[^\n]*\n[^\n]*Bad value\Z
#error: \A[^\n]*\.o,[^\n]*mixup[^\n]*\n[^\n]*bad value\Z
# R_CRIS_16_TPREL in executable against symbol from DSO.

View File

@ -2,6 +2,6 @@
#source: tls-x.s
#as: --no-underscore --em=criself
#ld: --shared -m crislinux
#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*Invalid operation\Z
#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*invalid operation\Z
# Check that a R_CRIS_32_IE in input to a DSO is flagged as an error.

View File

@ -1,3 +1,3 @@
.*: .*: no symbol found for import library
.*: .*: failed to generate import library
.*: final link failed: No symbols
.*: final link failed: no symbols

View File

@ -112,7 +112,7 @@ run_cc_link_tests $build_tests
global ld
set string ": final link failed: Bad value"
set string ": final link failed: bad value"
set string1 ": local symbol \`foo\' in tmpdir/indirect1b.o is referenced by DSO"
set testname "Indirect symbol 1a"
@ -123,7 +123,7 @@ set testname "Indirect symbol 1b"
set cmd "$ld -e start -o tmpdir/indirect1 tmpdir/indirect1a.o tmpdir/libindirect1c.so tmpdir/indirect1b.o"
check_link_message "$cmd" [list $string1 $string] "$testname"
set string ": final link failed: Nonrepresentable section on output"
set string ": final link failed: nonrepresentable section on output"
set string2 ": no symbol version section for versioned symbol \`foo@FOO\'"
set testname "Indirect symbol 2"
set cmd "$ld -shared -o tmpdir/indirect2.so tmpdir/indirect2.o"