[Patch 4/6] ARM attributes: defaultless attributes
Nick Clifton
nickc@redhat.com
Fri Jan 16 09:48:00 GMT 2009
Hi Andrew,
> The attached patch adds a new flag for the attribute type. This flag
> indicates that the attribute does not have a default value.
Would you mind doing some tidying of this code ?
I really don't like magic numbers, so it would be great if you could
replace the type bit flags with self explanatory constants. Ie instead of:
/* The value of an object attribute. type & 1 indicates whether there
is an integer value; type & 2 indicates whether there is a string
value. */
have something like:
#define TYPE_FLAG_INT_VAL (1 << 0)
#define TYPE_FLAG_STR_VAL (1 << 1)
#define TYPE_FLAG_DEFAULT (1 << 2)
#define TYPE_HAS_INT_VAL(TYPE) ((TYPE) & TYPE_FLAG_INT_VAL)
#define TYPE_HAS_STR_VAL(TYPE) ((TYPE) & TYPE_FLAG_STR_VAL)
#define TYPE_HAS_DEFAULT(TYPE) ((TYPE) & TYPE_FLAG_DEFAULT)
Plus suitable changes to elf-attrs.c as well.
Cheers
Nick
More information about the Binutils
mailing list