[PATCH v1 3/4] aarch64 DWARF: add new CFI directive for PAuth_LR
Jan Beulich
jbeulich@suse.com
Tue Nov 26 07:20:30 GMT 2024
On 25.11.2024 18:37, Matthieu Longo wrote:
> On 2024-11-25 16:42, Jan Beulich wrote:
>> On 25.11.2024 17:28, Matthieu Longo wrote:
>>> --- a/gas/dw2gencfi.c
>>> +++ b/gas/dw2gencfi.c
>>> @@ -718,6 +718,7 @@ const pseudo_typeS cfi_pseudo_table[] =
>>> { "cfi_restore_state", dot_cfi, DW_CFA_restore_state },
>>> { "cfi_window_save", dot_cfi, DW_CFA_GNU_window_save },
>>> { "cfi_negate_ra_state", dot_cfi, DW_CFA_AARCH64_negate_ra_state },
>>> + { "cfi_negate_ra_state_with_pc", dot_cfi, DW_CFA_AARCH64_negate_ra_state_with_pc },
>>> { "cfi_escape", dot_cfi_escape, 0 },
>>> { "cfi_signal_frame", dot_cfi, CFI_signal_frame },
>>> { "cfi_personality", dot_cfi_personality, 0 },
>>> @@ -918,6 +919,10 @@ dot_cfi (int arg)
>>> cfi_add_CFA_insn (DW_CFA_GNU_window_save);
>>> break;
>>>
>>> + case DW_CFA_AARCH64_negate_ra_state_with_pc:
>>> + cfi_add_CFA_insn (DW_CFA_AARCH64_negate_ra_state_with_pc);
>>> + break;
>>
>> Oh, and: Shouldn't we learn from the confusion about the two other,
>> aliasing directives? IOW - what if this new directive is used on other
>> than Aarch64? Imo that would better be refused, to avoid ending up with
>> a similar problem again.
>
> I agree with you, that would be the best approach.
> That's what I did recently in GCC by moving architecture extension to
> the backend:
> https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=9e1c71bab50d51a1a8ec1a75080ffde6ca3d854c
> Unfortunately, from my understanding, this requires a major refactoring
> of the current implementation.
Well, wouldn't a simple "#ifdef TC_AARCH64" do?
Jan
More information about the Binutils
mailing list