aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-06-15 23:10:10 +0000
committerJoseph Myers <joseph@codesourcery.com>2010-06-15 23:10:10 +0000
commit3de4a297ec739ba0111d80a5b9060d9bffc2d899 (patch)
treea01c545854d8b5bbe1e6feeb71e2981badde2bd2 /bfd/elf-bfd.h
parent91ff43fe2d1d9c8594e06385af78ed29a063690f (diff)
downloadbinutils-3de4a297ec739ba0111d80a5b9060d9bffc2d899.zip
binutils-3de4a297ec739ba0111d80a5b9060d9bffc2d899.tar.gz
binutils-3de4a297ec739ba0111d80a5b9060d9bffc2d899.tar.bz2
* elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Define.
(struct elf_backend_data): Update comment on obj_attrs_order. * elf-attrs.c (vendor_obj_attr_size, vendor_set_obj_attr_contents, _bfd_elf_copy_obj_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE instead of hardcoded 4. * elf32-arm.c (elf32_arm_obj_attrs_order): Use LEAST_KNOWN_OBJ_ATTRIBUTE and LEAST_KNOWN_OBJ_ATTRIBUTE + 1 instead of hardcoded 4 and 5. (elf32_arm_merge_eabi_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE instead of hardcoded 4.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 226b95f..37e637c 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1245,10 +1245,11 @@ struct elf_backend_data
/* The section type to use for an attributes section. */
unsigned int obj_attrs_section_type;
- /* This function determines the order in which any attributes are written.
- It must be defined for input in the range 4..NUM_KNOWN_OBJ_ATTRIBUTES-1
- (this range is used in order to make unity easy). The returned value is
- the actual tag number to place in the input position. */
+ /* This function determines the order in which any attributes are
+ written. It must be defined for input in the range
+ LEAST_KNOWN_OBJ_ATTRIBUTE..NUM_KNOWN_OBJ_ATTRIBUTES-1 (this range
+ is used in order to make unity easy). The returned value is the
+ actual tag number to place in the input position. */
int (*obj_attrs_order) (int);
/* This is TRUE if the linker should act like collect and gather
@@ -1412,6 +1413,12 @@ struct bfd_elf_section_data
#define get_elf_backend_data(abfd) \
xvec_get_elf_backend_data ((abfd)->xvec)
+/* The least object attributes (within an attributes subsection) known
+ for any target. Some code assumes that the value 0 is not used and
+ the field for that attribute can instead be used as a marker to
+ indicate that attributes have been initialized. */
+#define LEAST_KNOWN_OBJ_ATTRIBUTE 4
+
/* The maximum number of known object attributes for any target. */
#define NUM_KNOWN_OBJ_ATTRIBUTES 71