diff options
author | Andrew Stubbs <andrew.stubbs@st.com> | 2009-01-19 11:55:35 +0000 |
---|---|---|
committer | Andrew Stubbs <andrew.stubbs@st.com> | 2009-01-19 11:55:35 +0000 |
commit | 3483fe2e0bd83ee8dba72f73c6a309cae2d75e7e (patch) | |
tree | c8d4210731ff5b6aaa81e8ef6507582b965c0d92 /bfd/elf32-arm.c | |
parent | 2d0bb7614be1a94ab9051c35fe95514b05fc0823 (diff) | |
download | gdb-3483fe2e0bd83ee8dba72f73c6a309cae2d75e7e.zip gdb-3483fe2e0bd83ee8dba72f73c6a309cae2d75e7e.tar.gz gdb-3483fe2e0bd83ee8dba72f73c6a309cae2d75e7e.tar.bz2 |
2009-01-19 Andrew Stubbs <ams@codesourcery.com>
bfd/
* elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
(obj_attr_size): Likewise.
(write_obj_attribute): Likewise.
(_bfd_elf_copy_obj_attributes): Likewise.
(_bfd_elf_parse_attributes): Likewise.
* elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
(ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
(ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
(ATTR_TYPE_HAS_NO_DEFAULT): New define.
* elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
with macros.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r-- | bfd/elf32-arm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index a047c5f..bf1f06f 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -8138,15 +8138,15 @@ static int elf32_arm_obj_attrs_arg_type (int tag) { if (tag == Tag_compatibility) - return 3; + return ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_STR_VAL; else if (tag == Tag_nodefaults) - return 5; - else if (tag == 4 || tag == 5) - return 2; + return ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_NO_DEFAULT; + else if (tag == Tag_CPU_raw_name || tag == Tag_CPU_name) + return ATTR_TYPE_FLAG_STR_VAL; else if (tag < 32) - return 1; + return ATTR_TYPE_FLAG_INT_VAL; else - return (tag & 1) != 0 ? 2 : 1; + return (tag & 1) != 0 ? ATTR_TYPE_FLAG_STR_VAL : ATTR_TYPE_FLAG_INT_VAL; } /* Read the architecture from the Tag_also_compatible_with attribute, if any. |