From bc251d509b711b2db0a1aa269c432d23be019f84 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 6 Nov 2006 10:39:17 +0000 Subject: * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Don't prepend "warning" to the message. * testsuite/ld-elf/warn2.d: New. * testsuite/ld-elf/symbol2w.s: New. * testsuite/ld-elf/symbol2ref.s: New. --- ld/emultempl/elf32.em | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'ld/emultempl') diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 99fb8ab..ff48c56 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -1180,10 +1180,8 @@ ${ELF_INTERPRETER_SET_DEFAULT} { asection *s; bfd_size_type sz; - bfd_size_type prefix_len; char *msg; bfd_boolean ret; - const char * gnu_warning_prefix = _("warning: "); if (is->just_syms_flag) continue; @@ -1193,14 +1191,12 @@ ${ELF_INTERPRETER_SET_DEFAULT} continue; sz = s->size; - prefix_len = strlen (gnu_warning_prefix); - msg = xmalloc ((size_t) (prefix_len + sz + 1)); - strcpy (msg, gnu_warning_prefix); - if (! bfd_get_section_contents (is->the_bfd, s, msg + prefix_len, + msg = xmalloc ((size_t) (sz + 1)); + if (! bfd_get_section_contents (is->the_bfd, s, msg, (file_ptr) 0, sz)) einfo ("%F%B: Can't read contents of section .gnu.warning: %E\n", is->the_bfd); - msg[prefix_len + sz] = '\0'; + msg[sz] = '\0'; ret = link_info.callbacks->warning (&link_info, msg, (const char *) NULL, is->the_bfd, (asection *) NULL, -- cgit v1.1