aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2005-02-08 03:50:08 +0000
committerHans-Peter Nilsson <hp@axis.com>2005-02-08 03:50:08 +0000
commit370a0e1bf42f48277354d7cf4caac1abefae22a9 (patch)
treee46b2d94442ec31e53eab529efcb15a67f5b99ba
parentf5cf64a7277fc62fa3243371962c81fe198db64d (diff)
downloadgdb-370a0e1bf42f48277354d7cf4caac1abefae22a9.zip
gdb-370a0e1bf42f48277354d7cf4caac1abefae22a9.tar.gz
gdb-370a0e1bf42f48277354d7cf4caac1abefae22a9.tar.bz2
* elflink.c (elf_link_add_object_symbols): Don't add "warning: "
prefix here.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elflink.c10
2 files changed, 8 insertions, 7 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 49a2a0b..ecd820d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2005-02-08 Hans-Peter Nilsson <hp@axis.com>
+
+ * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
+ prefix here.
+
2005-02-07 Maciej W. Rozycki <macro@mips.com>
* elf64-mips.c: Fix formatting throughout.
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 4ece121..d7c9ded 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,