From 2d0bb7614be1a94ab9051c35fe95514b05fc0823 Mon Sep 17 00:00:00 2001 From: Andrew Stubbs Date: Mon, 19 Jan 2009 11:50:31 +0000 Subject: 2009-01-19 Andrew Stubbs bfd/ * elf-attrs.c (is_default_attr): Support defaultless attributes. (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type. (bfd_elf_add_obj_attr_string): Likewise. (bfd_elf_add_obj_attr_int_string): Likewise. (_bfd_elf_parse_attributes): Allow for unknown flag bits in type. * elf-bfd.h (struct obj_attribute): Document new flag bit. * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that Tag_nodefaults has no default value. (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults comment to reflect the new state. gas/ * read.c (s_vendor_attribute): Allow for unknown flag bits in type. --- bfd/elf32-arm.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'bfd/elf32-arm.c') diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index ece1a56..a047c5f 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -8139,6 +8139,8 @@ elf32_arm_obj_attrs_arg_type (int tag) { if (tag == Tag_compatibility) return 3; + else if (tag == Tag_nodefaults) + return 5; else if (tag == 4 || tag == 5) return 2; else if (tag < 32) @@ -8675,11 +8677,10 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd) break; case Tag_nodefaults: - /* This tag is set if it exists, but the value is unused. - Unfortunately, we don't record whether each attribute is zero - initialized, or read from the file, so the information has been - lost. In any case, we don't write attributes with zero values. - Do nothing. */ + /* This tag is set if it exists, but the value is unused (and is + typically zero). We don't actually need to do anything here - + the merge happens automatically when the type flags are merged + below. */ break; case Tag_also_compatible_with: /* Already done in Tag_CPU_arch. */ -- cgit v1.1