This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Include minimal symbol flavour name in LOC_UNRESOLVED error message.


Doug Evans <xdje42@gmail.com> writes:
> Hi.
>
> The error message that is printed if a LOC_UNRESOLVED minsym isn't
> found can be a bit confusing. The goal here is to clarify what the
> term "symbol" means in the error message.
>...
> 2015-08-29  Doug Evans  <xdje42@gmail.com>
>
> 	bfd/
> 	* targets.c (enum bfd_flavour): Add comment.
> 	(bfd_flavour_name): New function.
> 	* bfd-in2.h: Regenerate.
>...
> +const char *
> +bfd_flavour_name (bfd *abfd)
> +{
> +  switch (abfd->xvec->flavour)

Btw, a better way to do this would be to take the flavour enum
as the parameter instead of the bfd. Why does the caller
have to have a bfd in order to get the print form of the
enum? I'll do that assuming the patch is otherwise ok.

Callers with a bfd could then just do
bfd_flavour_name (bfd_get_flavour (abfd)).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]