PATCH [4/4] arm: Add Tag_PACRET_use build attribute
authorAndrea Corallo <andrea.corallo@arm.com>
Mon, 5 Jul 2021 15:27:00 +0000 (17:27 +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_PACRET_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_PACRET_use' enum.

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

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

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

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

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

index 98f924019429ca11eca0e7fdf6bc81f484183724..2cb8768868b30ce1a228f8bd73e4e416b9de4b9b 100644 (file)
@@ -14615,6 +14615,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info)
        case Tag_PAC_extension:
        case Tag_BTI_extension:
        case Tag_BTI_use:
+       case Tag_PACRET_use:
          /* Use the largest value specified.  */
          if (in_attr[i].i > out_attr[i].i)
            out_attr[i].i = in_attr[i].i;
index 5893be36c2319eb1545e09623ea245d56b2d41e4..582c9dc32267908a35ac5efb989278b8dc9a175e 100644 (file)
@@ -16153,6 +16153,10 @@ static const char * arm_attr_tag_BTI_use[] =
   {"Compiled without branch target enforcement",
    "Compiled with branch target enforcement"};
 
+static const char * arm_attr_tag_PACRET_use[] =
+  {"Compiled without return address signing and authentication",
+   "Compiled with return address signing and authentication"};
+
 #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[] =
@@ -16196,6 +16200,7 @@ static arm_attr_public_tag arm_attr_public_tags[] =
   LOOKUP(50, PAC_extension),
   LOOKUP(52, BTI_extension),
   LOOKUP(74, BTI_use),
+  LOOKUP(76, PACRET_use),
   {64, "nodefaults", 0, NULL},
   {65, "also_compatible_with", 0, NULL},
   LOOKUP(66, T2EE_use),
index 12ba3fa7a1e25bf2344d33c22e6e9d4c439912ba..db549a8ee68b7e90b9b569110555d5cb9ee6ced7 100644 (file)
@@ -309,6 +309,7 @@ enum
   Tag_PAC_extension = 50,
   Tag_BTI_extension = 52,
   Tag_BTI_use = 74,
+  Tag_PACRET_use = 76,
   Tag_nodefaults = 64,
   Tag_also_compatible_with = 65,
   Tag_T2EE_use = 66,
index 8a0fe8b31288e6bf86728e07b4a82572a6155c33..d288d8d1573e8bda9d39cc9232313ae12e21066a 100644 (file)
@@ -33519,6 +33519,7 @@ arm_convert_symbolic_attribute (const char *name)
       T (Tag_PAC_extension),
       T (Tag_BTI_extension),
       T (Tag_BTI_use),
+      T (Tag_PACRET_use),
       /* We deliberately do not include Tag_MPextension_use_legacy.  */
 #undef T
     };
index 0f6e734e6d03f70dc0dfaa1a15730ab790f28d38..299f394b7aef4394cf2d34e5c42127f4d564a930 100644 (file)
@@ -330,6 +330,7 @@ enum
   Tag_PAC_extension = 50,
   Tag_BTI_extension = 52,
   Tag_BTI_use = 74,
+  Tag_PACRET_use = 76,
   Tag_nodefaults = 64,
   Tag_also_compatible_with,
   Tag_T2EE_use,