* [committed, PATCH] Remove the extra `\n' in warning/error messages
@ 2017-04-11 22:42 H.J. Lu
0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2017-04-11 22:42 UTC (permalink / raw)
To: binutils
* elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
extra `\n' in warning/error messages.
* elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
* elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
---
bfd/ChangeLog | 7 +++++++
bfd/elf-properties.c | 10 +++++-----
bfd/elf32-i386.c | 4 ++--
bfd/elf64-x86-64.c | 4 ++--
4 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 678a007..764f534 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,12 @@
2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
+ * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
+ extra `\n' in warning/error messages.
+ * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
+ * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
+
+2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
+
* elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
processor-specific properties with generic ELF target vector.
diff --git a/bfd/elf-properties.c b/bfd/elf-properties.c
index 04ef536..048ea9c 100644
--- a/bfd/elf-properties.c
+++ b/bfd/elf-properties.c
@@ -88,7 +88,7 @@ _bfd_elf_parse_gnu_properties (bfd *abfd, Elf_Internal_Note *note)
{
bad_size:
_bfd_error_handler
- (_("warning: %B: corrupt GNU_PROPERTY_TYPE (%ld) size: %#lx\n"),
+ (_("warning: %B: corrupt GNU_PROPERTY_TYPE (%ld) size: %#lx"),
abfd, note->type, note->descsz);
return FALSE;
}
@@ -104,7 +104,7 @@ bad_size:
if ((ptr + datasz) > ptr_end)
{
_bfd_error_handler
- (_("warning: %B: corrupt GNU_PROPERTY_TYPE (%ld) type (0x%x) datasz: 0x%x\n"),
+ (_("warning: %B: corrupt GNU_PROPERTY_TYPE (%ld) type (0x%x) datasz: 0x%x"),
abfd, note->type, type, datasz);
/* Clear all properties. */
elf_properties (abfd) = NULL;
@@ -143,7 +143,7 @@ bad_size:
if (datasz != align_size)
{
_bfd_error_handler
- (_("warning: %B: corrupt stack size: 0x%x\n"),
+ (_("warning: %B: corrupt stack size: 0x%x"),
abfd, datasz);
/* Clear all properties. */
elf_properties (abfd) = NULL;
@@ -161,7 +161,7 @@ bad_size:
if (datasz != 0)
{
_bfd_error_handler
- (_("warning: %B: corrupt no copy on protected size: 0x%x\n"),
+ (_("warning: %B: corrupt no copy on protected size: 0x%x"),
abfd, datasz);
/* Clear all properties. */
elf_properties (abfd) = NULL;
@@ -177,7 +177,7 @@ bad_size:
}
_bfd_error_handler
- (_("warning: %B: unsupported GNU_PROPERTY_TYPE (%ld) type: 0x%x\n"),
+ (_("warning: %B: unsupported GNU_PROPERTY_TYPE (%ld) type: 0x%x"),
abfd, note->type, type);
next:
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index b1afb49..7f2723d 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -6147,8 +6147,8 @@ elf_i386_parse_gnu_properties (bfd *abfd, unsigned int type,
{
_bfd_error_handler
((type == GNU_PROPERTY_X86_ISA_1_USED
- ? _("error: %B: <corrupt x86 ISA used size: 0x%x>\n")
- : _("error: %B: <corrupt x86 ISA needed size: 0x%x>\n")),
+ ? _("error: %B: <corrupt x86 ISA used size: 0x%x>")
+ : _("error: %B: <corrupt x86 ISA needed size: 0x%x>")),
abfd, datasz);
return property_corrupt;
}
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index a4048f1..5d3a653 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -6913,8 +6913,8 @@ elf_x86_64_parse_gnu_properties (bfd *abfd, unsigned int type,
{
_bfd_error_handler
((type == GNU_PROPERTY_X86_ISA_1_USED
- ? _("error: %B: <corrupt x86 ISA used size: 0x%x>\n")
- : _("error: %B: <corrupt x86 ISA needed size: 0x%x>\n")),
+ ? _("error: %B: <corrupt x86 ISA used size: 0x%x>")
+ : _("error: %B: <corrupt x86 ISA needed size: 0x%x>")),
abfd, datasz);
return property_corrupt;
}
--
2.9.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-04-11 22:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-11 22:42 [committed, PATCH] Remove the extra `\n' in warning/error messages H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).