> On 10 Jan 2024, at 09:02, Iain Sandoe <idsan...@googlemail.com> wrote:
>> On 10 Jan 2024, at 08:49, Jonathan Yong <10wa...@gmail.com> wrote:
>>
>> On 1/9/24 19:37, Radek Barton wrote:
>>> Hello.
>>> I forgot to add the target maintainers to the CC. My apologies for that.
>>> Furthermore, I am adding also relevant changes in
>>> `libgcc/config/aarch64/lse.S` file to the patch. Originally we wanted to
>>> submit those changes separately but after the feedback from Andrew Pinski,
>>> it makes sense to add them here. I needed to rename `HIDDEN`, `TYPE`, and
>>> `SIZE` macros to `HIDDEN_PO`, `TYPE_PO`, and `SIZE_PO` (pseudo-op) because
>>> there is a collision with other macro named `SIZE` in the `lse.S` file.
>>> Best regards,
>>> Radek
>>
>> Looks fine to me, but is __ELF__ correct? I am not familiar with pseudo-ops,
>> OK if it is ELF specific when PE is targeted.
>>
>
> I suspect that, the end, we really need to generalize this so that ELF,
> XCOFF, Mach-O etc. are handled. In other places in the tree, typically an
> “asm.h” (or similar name) is included which contains macros that adjust:
>
> global symbol
> local symbol
> type
> size
>
> (and sometimes .cfi_xxxx-related)
>
> Then the asm sources are adjusted to use those macros throughout, which
> means that they build correctly for the different object file formats.
>
> You should be able to find a suitable example in other ports which could be
> updated to cater for aarch64-specific cases.
duh, I was not looking hard enough - it seems that there is already such a file
libgcc/config/aarch64/aarch64-asm.h
It has just not been used in the SME stuff.
Iain