PATCH [3/4] arm: Add Tag_BTI_use build attribute
bfd/ 2021-07-06 Andrea Corallo <andrea.corallo@arm.com> * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add 'Tag_BTI_use' case. binutils/ 2021-07-06 Andrea Corallo <andrea.corallo@arm.com> * readelf.c (arm_attr_tag_PAC_extension): Declare. (arm_attr_public_tags): Add 'PAC_extension' lookup. elfcpp/ 2021-07-06 Andrea Corallo <andrea.corallo@arm.com> * arm.h: Define 'Tag_BTI_use' enum. gas/ 2021-07-06 Andrea Corallo <andrea.corallo@arm.com> * config/tc-arm.c (arm_convert_symbolic_attribute): Add 'Tag_BTI_use' to the attribute_table. include/ 2021-07-06 Andrea Corallo <andrea.corallo@arm.com> * elf/arm.h (elf_arm_reloc_type): Add 'Tag_BTI_use'.
This commit is contained in:
parent
4b53503018
commit
b81ee92f03
5 changed files with 9 additions and 0 deletions
|
@ -14614,6 +14614,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info)
|
||||||
case Tag_MVE_arch:
|
case Tag_MVE_arch:
|
||||||
case Tag_PAC_extension:
|
case Tag_PAC_extension:
|
||||||
case Tag_BTI_extension:
|
case Tag_BTI_extension:
|
||||||
|
case Tag_BTI_use:
|
||||||
/* Use the largest value specified. */
|
/* Use the largest value specified. */
|
||||||
if (in_attr[i].i > out_attr[i].i)
|
if (in_attr[i].i > out_attr[i].i)
|
||||||
out_attr[i].i = in_attr[i].i;
|
out_attr[i].i = in_attr[i].i;
|
||||||
|
|
|
@ -16149,6 +16149,10 @@ static const char * arm_attr_tag_BTI_extension[] =
|
||||||
"BTI instructions permitted in the NOP space",
|
"BTI instructions permitted in the NOP space",
|
||||||
"BTI instructions permitted in the NOP and in the non-NOP space"};
|
"BTI instructions permitted in the NOP and in the non-NOP space"};
|
||||||
|
|
||||||
|
static const char * arm_attr_tag_BTI_use[] =
|
||||||
|
{"Compiled without branch target enforcement",
|
||||||
|
"Compiled with branch target enforcement"};
|
||||||
|
|
||||||
#define LOOKUP(id, name) \
|
#define LOOKUP(id, name) \
|
||||||
{id, #name, 0x80 | ARRAY_SIZE(arm_attr_tag_##name), arm_attr_tag_##name}
|
{id, #name, 0x80 | ARRAY_SIZE(arm_attr_tag_##name), arm_attr_tag_##name}
|
||||||
static arm_attr_public_tag arm_attr_public_tags[] =
|
static arm_attr_public_tag arm_attr_public_tags[] =
|
||||||
|
@ -16191,6 +16195,7 @@ static arm_attr_public_tag arm_attr_public_tags[] =
|
||||||
LOOKUP(48, MVE_arch),
|
LOOKUP(48, MVE_arch),
|
||||||
LOOKUP(50, PAC_extension),
|
LOOKUP(50, PAC_extension),
|
||||||
LOOKUP(52, BTI_extension),
|
LOOKUP(52, BTI_extension),
|
||||||
|
LOOKUP(74, BTI_use),
|
||||||
{64, "nodefaults", 0, NULL},
|
{64, "nodefaults", 0, NULL},
|
||||||
{65, "also_compatible_with", 0, NULL},
|
{65, "also_compatible_with", 0, NULL},
|
||||||
LOOKUP(66, T2EE_use),
|
LOOKUP(66, T2EE_use),
|
||||||
|
|
|
@ -308,6 +308,7 @@ enum
|
||||||
Tag_MVE_arch = 48,
|
Tag_MVE_arch = 48,
|
||||||
Tag_PAC_extension = 50,
|
Tag_PAC_extension = 50,
|
||||||
Tag_BTI_extension = 52,
|
Tag_BTI_extension = 52,
|
||||||
|
Tag_BTI_use = 74,
|
||||||
Tag_nodefaults = 64,
|
Tag_nodefaults = 64,
|
||||||
Tag_also_compatible_with = 65,
|
Tag_also_compatible_with = 65,
|
||||||
Tag_T2EE_use = 66,
|
Tag_T2EE_use = 66,
|
||||||
|
|
|
@ -33518,6 +33518,7 @@ arm_convert_symbolic_attribute (const char *name)
|
||||||
T (Tag_MVE_arch),
|
T (Tag_MVE_arch),
|
||||||
T (Tag_PAC_extension),
|
T (Tag_PAC_extension),
|
||||||
T (Tag_BTI_extension),
|
T (Tag_BTI_extension),
|
||||||
|
T (Tag_BTI_use),
|
||||||
/* We deliberately do not include Tag_MPextension_use_legacy. */
|
/* We deliberately do not include Tag_MPextension_use_legacy. */
|
||||||
#undef T
|
#undef T
|
||||||
};
|
};
|
||||||
|
|
|
@ -329,6 +329,7 @@ enum
|
||||||
Tag_MVE_arch = 48,
|
Tag_MVE_arch = 48,
|
||||||
Tag_PAC_extension = 50,
|
Tag_PAC_extension = 50,
|
||||||
Tag_BTI_extension = 52,
|
Tag_BTI_extension = 52,
|
||||||
|
Tag_BTI_use = 74,
|
||||||
Tag_nodefaults = 64,
|
Tag_nodefaults = 64,
|
||||||
Tag_also_compatible_with,
|
Tag_also_compatible_with,
|
||||||
Tag_T2EE_use,
|
Tag_T2EE_use,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue