More ARM EABI object attributes in binutils. This adds support to binutils

to include the Unaligned Access and Floating-point Half-precision
attributes. the former marks ELF objects that may access ARMv6 style
unaligned data, the latter that the binary uses the VFPv3/Advanced SIMD
half-precision extension.

These may be emmitted by clang so it's best to print a warning when the
linker hits one of them.

Differential Revision:	http://reviews.freebsd.org/D2194
Submitted by:	Michal Meloun <meloun@miracle.cz>
MFC after:	1 week
This commit is contained in:
Andrew Turner 2015-04-03 19:33:26 +00:00
parent 1f26983742
commit ef25e82143
3 changed files with 11 additions and 3 deletions

View File

@ -1286,7 +1286,7 @@ struct elf_find_verdep_info
};
/* The maximum number of known object attributes for any target. */
#define NUM_KNOWN_OBJ_ATTRIBUTES 32
#define NUM_KNOWN_OBJ_ATTRIBUTES 71
/* The value of an object attribute. type & 1 indicates whether there
is an integer value; type & 2 indicates whether there is a string

View File

@ -6835,6 +6835,8 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd)
case Tag_ABI_FP_number_model:
case Tag_ABI_align8_preserved:
case Tag_ABI_HardFP_use:
case Tag_CPU_unaligned_access:
case Tag_FP_HP_extension:
/* Use the largest value specified. */
if (in_attr[i].i > out_attr[i].i)
out_attr[i].i = in_attr[i].i;
@ -6951,7 +6953,9 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd)
}
break;
default: /* All known attributes should be explicitly covered. */
abort ();
/* XXX Not now */
/* abort (); */
break;
}
}

View File

@ -271,7 +271,11 @@ enum
Tag_ABI_optimization_goals,
Tag_ABI_FP_optimization_goals,
/* 32 is generic. */
Tag_CPU_unaligned_access = 34,
Tag_FP_HP_extension = 36,
Tag_ABI_FP_16bit_format = 38,
Tag_MPextension_use = 42,
Tag_DIV_use = 44,
Tag_Virtualization_use = 68,
};