diff options
author | Matthieu Longo <matthieu.longo@arm.com> | 2024-11-14 16:12:05 +0000 |
---|---|---|
committer | Matthieu Longo <matthieu.longo@arm.com> | 2024-12-02 15:18:40 +0000 |
commit | fc569c422fd9485e33085a4ae4aa628306344745 (patch) | |
tree | 578641da8ff9d9dba8b67b678b52c4625607efef | |
parent | b4377af729850cfda7b59d4349428af2f0bf8cdb (diff) | |
download | fsf-binutils-gdb-fc569c422fd9485e33085a4ae4aa628306344745.zip fsf-binutils-gdb-fc569c422fd9485e33085a4ae4aa628306344745.tar.gz fsf-binutils-gdb-fc569c422fd9485e33085a4ae4aa628306344745.tar.bz2 |
aarch64: rename gnu_and_prop to gnu_property_aarch64_feature_1_and
-rw-r--r-- | bfd/elfnn-aarch64.c | 24 | ||||
-rw-r--r-- | bfd/elfxx-aarch64.c | 14 |
2 files changed, 19 insertions, 19 deletions
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index ba58349..ae7105a 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -2540,7 +2540,7 @@ struct elf_aarch64_obj_tdata int no_wchar_size_warning; /* All GNU_PROPERTY_AARCH64_FEATURE_1_AND properties. */ - uint32_t gnu_and_prop; + uint32_t gnu_property_aarch64_feature_1_and; /* Software protections options. */ struct aarch64_protection_opts sw_protections; @@ -3464,8 +3464,8 @@ aarch64_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) static bool elf_aarch64_bti_p (bfd *output_bfd) { - uint32_t prop = elf_aarch64_tdata (output_bfd)->gnu_and_prop; - return prop & GNU_PROPERTY_AARCH64_FEATURE_1_BTI; + return elf_aarch64_tdata (output_bfd)->gnu_property_aarch64_feature_1_and + & GNU_PROPERTY_AARCH64_FEATURE_1_BTI; } /* External entry points for sizing and building linker stubs. */ @@ -5040,7 +5040,7 @@ bfd_elfNN_aarch64_set_options (struct bfd *output_bfd, /* Note: gnu_property_aarch64_feature_1_and was initialized to 0 by bfd_zalloc(). */ if (sw_protections->plt_type & PLT_BTI) - elf_aarch64_tdata (output_bfd)->gnu_and_prop + elf_aarch64_tdata (output_bfd)->gnu_property_aarch64_feature_1_and |= GNU_PROPERTY_AARCH64_FEATURE_1_BTI; elf_aarch64_tdata (output_bfd)->sw_protections = *sw_protections; @@ -10616,11 +10616,11 @@ static bfd * elfNN_aarch64_link_setup_gnu_properties (struct bfd_link_info *info) { struct elf_aarch64_obj_tdata * tdata = elf_aarch64_tdata (info->output_bfd); - uint32_t prop = tdata->gnu_and_prop; - bfd *pbfd = _bfd_aarch64_elf_link_setup_gnu_properties (info, &prop); - tdata->gnu_and_prop = prop; + uint32_t outprop = tdata->gnu_property_aarch64_feature_1_and; + bfd *pbfd = _bfd_aarch64_elf_link_setup_gnu_properties (info, &outprop); + tdata->gnu_property_aarch64_feature_1_and = outprop; tdata->sw_protections.plt_type - |= (prop & GNU_PROPERTY_AARCH64_FEATURE_1_BTI) ? PLT_BTI : 0; + |= (outprop & GNU_PROPERTY_AARCH64_FEATURE_1_BTI) ? PLT_BTI : 0; setup_plt_values (info, tdata->sw_protections.plt_type); return pbfd; } @@ -10634,8 +10634,8 @@ elfNN_aarch64_merge_gnu_properties (struct bfd_link_info *info, elf_property *aprop, elf_property *bprop) { - uint32_t prop - = elf_aarch64_tdata (info->output_bfd)->gnu_and_prop; + uint32_t outprop + = elf_aarch64_tdata (info->output_bfd)->gnu_property_aarch64_feature_1_and; /* Properties are merged per type, hence only check for warnings when merging GNU_PROPERTY_AARCH64_FEATURE_1_AND. */ @@ -10648,7 +10648,7 @@ elfNN_aarch64_merge_gnu_properties (struct bfd_link_info *info, /* If output has been marked with BTI using command line argument, give out warning if necessary. */ - if ((prop & GNU_PROPERTY_AARCH64_FEATURE_1_BTI) + if ((outprop & GNU_PROPERTY_AARCH64_FEATURE_1_BTI) && (bti_report != MARKING_NONE)) { if (!aprop || !(aprop->u.number & GNU_PROPERTY_AARCH64_FEATURE_1_BTI)) @@ -10659,7 +10659,7 @@ elfNN_aarch64_merge_gnu_properties (struct bfd_link_info *info, } return _bfd_aarch64_elf_merge_gnu_properties (info, abfd, aprop, - bprop, prop); + bprop, outprop); } /* We use this so we can override certain functions diff --git a/bfd/elfxx-aarch64.c b/bfd/elfxx-aarch64.c index 45a246a..2c0afb5 100644 --- a/bfd/elfxx-aarch64.c +++ b/bfd/elfxx-aarch64.c @@ -710,7 +710,7 @@ _bfd_aarch64_elf_link_setup_gnu_properties (struct bfd_link_info *info, elf_property *prop; unsigned align; - uint32_t gnu_prop = *gprop; + uint32_t outprop = *gprop; /* Find a normal input file with GNU property note. */ for (pbfd = info->input_bfds; @@ -728,17 +728,17 @@ _bfd_aarch64_elf_link_setup_gnu_properties (struct bfd_link_info *info, /* If ebfd != NULL it is either an input with property note or the last input. Either way if we have gnu_prop, we should add it (by creating a section if needed). */ - if (ebfd != NULL && gnu_prop) + if (ebfd != NULL && outprop) { prop = _bfd_elf_get_property (ebfd, GNU_PROPERTY_AARCH64_FEATURE_1_AND, 4); - if (gnu_prop & GNU_PROPERTY_AARCH64_FEATURE_1_BTI + if (outprop & GNU_PROPERTY_AARCH64_FEATURE_1_BTI && !(prop->u.number & GNU_PROPERTY_AARCH64_FEATURE_1_BTI)) _bfd_error_handler (_("%pB: warning: BTI turned on by -z force-bti " "when all inputs do not have BTI in NOTE " "section."), ebfd); - prop->u.number |= gnu_prop; + prop->u.number |= outprop; prop->pr_kind = property_number; /* pbfd being NULL implies ebfd is the last input. Create the GNU @@ -772,7 +772,7 @@ _bfd_aarch64_elf_link_setup_gnu_properties (struct bfd_link_info *info, return pbfd; /* If pbfd has any GNU_PROPERTY_AARCH64_FEATURE_1_AND properties, update - gnu_prop accordingly. */ + outprop accordingly. */ if (pbfd != NULL) { elf_property_list *p; @@ -783,7 +783,7 @@ _bfd_aarch64_elf_link_setup_gnu_properties (struct bfd_link_info *info, /* Check for all GNU_PROPERTY_AARCH64_FEATURE_1_AND. */ if (GNU_PROPERTY_AARCH64_FEATURE_1_AND == p->property.pr_type) { - gnu_prop = (p->property.u.number + outprop = (p->property.u.number & (GNU_PROPERTY_AARCH64_FEATURE_1_PAC | GNU_PROPERTY_AARCH64_FEATURE_1_BTI)); break; @@ -792,7 +792,7 @@ _bfd_aarch64_elf_link_setup_gnu_properties (struct bfd_link_info *info, break; } } - *gprop = gnu_prop; + *gprop = outprop; return pbfd; } |