From 370a0e1bf42f48277354d7cf4caac1abefae22a9 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Tue, 8 Feb 2005 03:50:08 +0000 Subject: [PATCH] * elflink.c (elf_link_add_object_symbols): Don't add "warning: " prefix here. --- bfd/ChangeLog | 5 +++++ bfd/elflink.c | 10 +++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 49a2a0b695e..ecd820db92b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2005-02-08 Hans-Peter Nilsson + + * elflink.c (elf_link_add_object_symbols): Don't add "warning: " + prefix here. + 2005-02-07 Maciej W. Rozycki * elf64-mips.c: Fix formatting throughout. diff --git a/bfd/elflink.c b/bfd/elflink.c index 4ece121ea32..d7c9ded0b18 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -3142,8 +3142,6 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) { char *msg; bfd_size_type sz; - bfd_size_type prefix_len; - const char * gnu_warning_prefix = _("warning: "); name += sizeof ".gnu.warning." - 1; @@ -3177,16 +3175,14 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) } sz = s->size; - prefix_len = strlen (gnu_warning_prefix); - msg = bfd_alloc (abfd, prefix_len + sz + 1); + msg = bfd_alloc (abfd, sz + 1); if (msg == NULL) goto error_return; - strcpy (msg, gnu_warning_prefix); - if (! bfd_get_section_contents (abfd, s, msg + prefix_len, 0, sz)) + if (! bfd_get_section_contents (abfd, s, msg, 0, sz)) goto error_return; - msg[prefix_len + sz] = '\0'; + msg[sz] = '\0'; if (! (_bfd_generic_link_add_one_symbol (info, abfd, name, BSF_WARNING, s, 0, msg, -- 2.30.2