make bfd_target symbol_leading_char variable?
Hans-Peter Nilsson
hp@axis.com
Thu Sep 7 07:30:00 GMT 2000
Hi.
I'd like to be able to have the value of
bfd_get_symbol_leading_char non-fixed for a target, decided by
(primarily) object file flags.
What controls this (outside of gas) is
char symbol_leading_char;
in the bfd_target structure. But it isn't modifiable, since in
a struct _bfd, the xvec member is
const struct bfd_target *xvec;
It would be wrong to make xvec non-const, but perhaps we can
change "char symbol_leading_char" into "char
*symbol_leading_char_p", where the character pointed to is
supposed to be changeable for some time at least up to after
*_bfd_copy_private_bfd_data or *_bfd_merge_private_bfd_data? I
believe a minimal number of callers need to be changed (object
format files, targets.c and bfd-in.h), and the runtime penalty
should be unnoticable.
Is this a change that stand a chance to be approved?
Another approach could be to make a different bfd_target with
only a different symbol_leading_char. No other targets would be
affected. But I think it would be, um, less clean, and I'm not
really sure it is a realistic change.
Comments?
brgds, H-P
More information about the Binutils
mailing list