This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFC] extending bfd_print_private_bfd_data
On Nov 4, 2009, at 4:05 PM, Dave Korn wrote:
As long as you're going to the lengths of accepting a list of names
from the
backend and parsing them all and passing them back one at a time to
the
backend, why not go that little way further and build a word full of
flag bits
instead? It would save all the bfd_print_private_bfd_data routines
from
filling up with lots of ugly strcmps if they could just check a
bitmask.
This requires table to translate names to flag bits. But I am not
sure that this is easy to do because
some print_private_bfd_data calls a more generic version of it (eg:
elf).
Maybe you have a nice idea to implement such a table ?
If you want to use flag bits, we could create one or two helpers that
does the work (one for converting
a word to a flag, and the other to generate the help).
Tristan.