ld error/warning messages

Steve Ellcey sellcey@cavium.com
Tue Feb 27 16:25:00 GMT 2018

On Tue, 2018-02-27 at 15:22 +1030, Alan Modra wrote:
> On Mon, Feb 26, 2018 at 04:24:22PM -0800, Steve Ellcey wrote:
> > 
> > It looks like the important difference is 'In function' (capital I)
> > vs.
> > 'in function' (lowercase i).  That is why this line is no longer
> > getting pruned the way it did before.
> > 
> > We could get the GCC testsuite to prune this line with a change
> > to prune_gcc_output in gcc/testsuite/lib/prune.exp but I am not 
> > sure if that is what we want to do or if you meant to use a capital
> > I in this case and the lower case i is a bug.
> See https://www.gnu.org/prep/standards/standards.html#Errors
> "The string message should not begin with a capital letter when it
> follows a program name and/or file name.."
> So yes, I meant to use the lower case "in function".  Adding the
> program name for ld was deliberate too.
> Hmm.
> // Ignore additional messages on Linux/x86 with PIE
> // { dg-prune-output "Bad value" } */
> That one is not going to match either.

GCC does some 'automatic' pruning in addition to the prunning that is
specifically requested via dg-prune.  If you look at
the prune_gcc_output function in gcc/testsuite/lib/prune.exp you will
see the line:

regsub -all "(^|\n)(\[^\n\]*: )?In ((static member |lambda )?function|member|method|(copy )?constructor|destructor|instantiation|substitution|program|subroutine|block-data)\[^\n\]*" $text "" text

I believe this prunning is done to all output before the specific
prunning requested by dg-prune.  I copied this line and changed 'In' to
'in' and that made the failure go away.  I couldn't just changed the
line because some other errors are still using 'In'
instead of 'in'.

Steve Ellcey

More information about the Binutils mailing list