diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-11-24 16:55:32 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-11-24 16:55:32 +0000 |
commit | 191b9449067b27182f10aa55e729133c05d65a38 (patch) | |
tree | e00d7abebe1e31b5f51827f3a996c3613f3d01fd /gnu/usr.bin | |
parent | 714367591c802f811a10eda67d38483d58c11b5f (diff) |
Do not put a ``warning: '' prefix to stabs warning messages, as we already
provide it in the message.
Same logic as in ld/emultempl/elf32.em, except that some arches use
duplicated code in libbfd now. Can you spell bloat?
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r-- | gnu/usr.bin/binutils/bfd/elflink.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gnu/usr.bin/binutils/bfd/elflink.c b/gnu/usr.bin/binutils/bfd/elflink.c index 6628db34cce..32aa2343586 100644 --- a/gnu/usr.bin/binutils/bfd/elflink.c +++ b/gnu/usr.bin/binutils/bfd/elflink.c @@ -2918,8 +2918,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; @@ -2953,16 +2951,14 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) } sz = bfd_section_size (abfd, s); - 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, |