PATCH [2/4] arm: Add Tag_BTI_extension build attribute
authorAndrea Corallo <andrea.corallo@arm.com>
Mon, 5 Jul 2021 14:37:19 +0000 (16:37 +0200)
committerAndrea Corallo <andrea.corallo@arm.com>
Tue, 17 Aug 2021 12:49:42 +0000 (14:49 +0200)
bfd/
2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

* elf32-arm.c (elf32_arm_merge_eabi_attributes): Add
'Tag_BTI_extension' 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_extension' enum.

gas/
2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

* config/tc-arm.c (arm_convert_symbolic_attribute): Add
'Tag_BTI_extension' to the attribute_table.

include/
2021-07-06  Andrea Corallo  <andrea.corallo@arm.com>

* elf/arm.h (elf_arm_reloc_type): Add 'Tag_BTI_extension'.

bfd/elf32-arm.c
binutils/readelf.c
elfcpp/arm.h
gas/config/tc-arm.c
include/elf/arm.h

index bb4ba89357e357be7ed9fc8fa62c1dbb72591e8e..73061047e29acb7217ed67f8ca730ab8c6d8db02 100644 (file)
@@ -14613,6 +14613,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info)
        case Tag_MPextension_use:
        case Tag_MVE_arch:
        case Tag_PAC_extension:
+       case Tag_BTI_extension:
          /* Use the largest value specified.  */
          if (in_attr[i].i > out_attr[i].i)
            out_attr[i].i = in_attr[i].i;
index d38a07f0fa583cc1b139ef8543ac77628075229a..ce76076eaa046353c64ec4a029c82d2704ef4a6a 100644 (file)
@@ -16144,6 +16144,11 @@ static const char * arm_attr_tag_PAC_extension[] =
    "PAC/AUT instructions permitted in the NOP space",
    "PAC/AUT instructions permitted in the NOP and in the non-NOP space"};
 
+static const char * arm_attr_tag_BTI_extension[] =
+  {"BTI instructions not permitted",
+   "BTI instructions permitted in the NOP space",
+   "BTI instructions permitted in the NOP and in the non-NOP space"};
+
 #define LOOKUP(id, name) \
   {id, #name, 0x80 | ARRAY_SIZE(arm_attr_tag_##name), arm_attr_tag_##name}
 static arm_attr_public_tag arm_attr_public_tags[] =
@@ -16185,6 +16190,7 @@ static arm_attr_public_tag arm_attr_public_tags[] =
   LOOKUP(46, DSP_extension),
   LOOKUP(48, MVE_arch),
   LOOKUP(50, PAC_extension),
+  LOOKUP(52, BTI_extension),
   {64, "nodefaults", 0, NULL},
   {65, "also_compatible_with", 0, NULL},
   LOOKUP(66, T2EE_use),
index ce682a5bdc62fd6268acfbfe7371aaa7c1d9a03f..42144ce13bee5e46edc0cca1166cb72902f21f28 100644 (file)
@@ -307,6 +307,7 @@ enum
   Tag_DIV_use = 44,
   Tag_MVE_arch = 48,
   Tag_PAC_extension = 50,
+  Tag_BTI_extension = 52,
   Tag_nodefaults = 64,
   Tag_also_compatible_with = 65,
   Tag_T2EE_use = 66,
index 2827e2949c3e103fd42f3ce50824f79d04e1fea1..533419b95b1e1c6464bfe32ac9cbe0f03283b015 100644 (file)
@@ -33517,6 +33517,7 @@ arm_convert_symbolic_attribute (const char *name)
       T (Tag_DSP_extension),
       T (Tag_MVE_arch),
       T (Tag_PAC_extension),
+      T (Tag_BTI_extension),
       /* We deliberately do not include Tag_MPextension_use_legacy.  */
 #undef T
     };
index 27b676860dd685da746a35d83ab5752afc361a0b..eb2ae9f430140cb4ec1ac0513a3d18394b50eba4 100644 (file)
@@ -328,6 +328,7 @@ enum
   Tag_DSP_extension = 46,
   Tag_MVE_arch = 48,
   Tag_PAC_extension = 50,
+  Tag_BTI_extension = 52,
   Tag_nodefaults = 64,
   Tag_also_compatible_with,
   Tag_T2EE_use,