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] Add bfd_target_info function to bfd and unify windres/windmc target information gathering


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



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