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 Nick,

2009/11/12 Nick Clifton <nickc@redhat.com>:
> 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

Ok, here is the updated patch.

ChangeLog for bfd

2009-11-14  Kai Tietz  <kai.tietz@onevision.com>

	* targets.c (bfd_get_target_info): New function.
	(_bfd_find_arch_match): New function.
	* bfd-in2.h: Regenerated.

ChangeLog for binutils

2009-11-14  Kai Tietz  <kai.tietz@onevision.com>

	* windmc.c (set_endianess): Use bfd_get_target_info.
	* windres.c (set_endianess): Likewise.
	(find_arch_match): Removed.

Tested for i686-pc-mingw32, i686-pc-cygwin, and x86_64-pc-mingw32. Ok for apply?

Cheers,
Kai

-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

Attachment: bfd_target_info.diff
Description: Binary data


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