From: Hans-Peter Nilsson Date: Tue, 8 Feb 2005 03:50:08 +0000 (+0000) Subject: * elflink.c (elf_link_add_object_symbols): Don't add "warning: " X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=370a0e1bf42f48277354d7cf4caac1abefae22a9;p=binutils-gdb.git * elflink.c (elf_link_add_object_symbols): Don't add "warning: " prefix here. --- 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,