+2003-08-04 Nick Clifton <nickc@redhat.com>
+
+ * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
+ to messages produced for .gnu.warning.SYMBOL sections.
+
2003-08-04 Alan Modra <amodra@bigpond.net.au>
* elfcode.h: Convert to C90, remove unneeded casts and prototypes.
{
char *msg;
bfd_size_type sz;
+ bfd_size_type prefix_len;
+ const char * gnu_warning_prefix = _("warning: ");
name += sizeof ".gnu.warning." - 1;
}
sz = bfd_section_size (abfd, s);
- msg = bfd_alloc (abfd, sz + 1);
+ prefix_len = strlen (gnu_warning_prefix);
+ msg = bfd_alloc (abfd, prefix_len + sz + 1);
if (msg == NULL)
goto error_return;
- if (! bfd_get_section_contents (abfd, s, msg, 0, sz))
+ strcpy (msg, gnu_warning_prefix);
+ if (! bfd_get_section_contents (abfd, s, msg + prefix_len, 0, sz))
goto error_return;
- msg[sz] = '\0';
+ msg[prefix_len + sz] = '\0';
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, name, BSF_WARNING, s, 0, msg,
+2003-08-04 Nick Clifton <nickc@redhat.com>
+
+ * emultempl/elf32.em (before_allocation): Prepend "warning: "
+ to messages produced for .gnu.warning.SYMBOL sections.
+
2003-08-04 Alan Modra <amodra@bigpond.net.au>
* emultempl/elf32.em (output_rel_find): Add "isdyn" param. Put
{
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;
continue;
sz = bfd_section_size (is->the_bfd, s);
- msg = xmalloc ((size_t) sz + 1);
- if (! bfd_get_section_contents (is->the_bfd, s, msg, (file_ptr) 0, sz))
+ 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,
+ (file_ptr) 0, sz))
einfo ("%F%B: Can't read contents of section .gnu.warning: %E\n",
is->the_bfd);
- msg[sz] = '\0';
+ msg[prefix_len + sz] = '\0';
ret = link_info.callbacks->warning (&link_info, msg,
(const char *) NULL,
is->the_bfd, (asection *) NULL,