[patch] Add bfd_target_info function to bfd and unify windres/windmc target information gathering

Nick Clifton nickc@redhat.com
Thu Nov 12 10:58:00 GMT 2009


Hi Kai,

> Well, this was the reason, why I put the target_name check within this
> function. I wanted to avoid multiple patterns of the form
> 
> bfd_target *t = bfd_find_target (my_target, NULL);
> if (!t) error out
> my_store_symbol_prefix = t->symbol_prefix;
> 
>  ....
> 
> As most of the bfd helper macros here depend on an existing bfd *. But
> a bfd * is at some points not present (eg windres tool and windmc), so
> a function to gather those information by a common function is better
> then re-implementing again and again.

OK, that is fair.  In which case lets go with your original plan for the 
function.

Cheers
   Nick




More information about the Binutils mailing list