bfd_error_handler extension

Nick Clifton nickc@redhat.com
Thu Aug 12 07:07:00 GMT 2004


Hi Alan,

> So my idea was to always pass extension args first.  A call might look
> like
> 
>   (*_bfd_error_handler)
>     (_("%B: bad reloc symbol index (0x%lx >= 0x%lx) for offset 0x%lx in section `%S'"),
>      abfd, sec,
>      (unsigned long) r_symndx, (unsigned long) nsyms, irela->r_offset);

> _bfd_default_error_handler then would process any %B or %S in the format
> string, and pass a substituted format string on to vfprint.  There is
> some nastiness with this approach, since you need to expand "%" in any
> substitutions to "%%".

Which should be a pretty rare case right ?  I think that this is a good 
idea - code simplification is always a good thing.

Cheers
   Nick




More information about the Binutils mailing list