[patch] Add bfd_target_info function to bfd and unify windres/windmc target information gathering
Nick Clifton
nickc@redhat.com
Wed Nov 11 10:03:00 GMT 2009
Hi Kai,
>> + const bfd_target * bfd_target_info (const char *target_name, bfd *abfd,
>> + int *is_bigendian, int *underscoring,
>> + const char **def_target_arch);
>>
>> Assuming that you agree with my suggestion above then I would consider
>> renaming this function to something like bfd_get_target_info() and
>> have it return the default target architecture.
> Hmm, exactly this I wanted to avoid. The architecture detection is a
> bit costy, so I wanted to have this check optional.
But the other information returned by this function (endianness, prefix
character) is easily extracted from the target vector. There is no need
to have a special function to compute it. So the real value of this new
function is costly architecture detection.
Cheers
Nick
More information about the Binutils
mailing list