please prepend "warning: " to messages emitted because of .gnu.warning sections

Zack Weinberg zack@codesourcery.com
Fri Aug 1 08:43:00 GMT 2003


Over in gcc land we got a non-bug report which boiled down to the user
having been confused by one of glibc's custom warning messages:

session.c:450: the use of `tmpnam' is dangerous, better use `mkstemp'

This is produced with a .gnu.warning section, which is an undocumented
feature of GNU ld.  Note the absence of any indication that this is a
warning, not an error.  The user thought it was a hard error and
therefore ignored the real problem with their code.

I brought this up with the libc people and they suggested that ld
ought to be responsible for prepending "warning: " to messages emitted
because of .gnu.warning sections.  On reflection I agree.  Any chance
this could be done for the next binutils release?

zw



More information about the Binutils mailing list