This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Patch 4/6] ARM attributes: defaultless attributes
- From: Nick Clifton <nickc at redhat dot com>
- To: Andrew Stubbs <ams at codesourcery dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 16 Jan 2009 09:45:30 +0000
- Subject: Re: [Patch 4/6] ARM attributes: defaultless attributes
- References: <496C6691.70001@codesourcery.com>
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