> 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.

0.02GBP only, ( I do not have cycles to tackle this myself right now, although 
I have temporary workarounds in my Darwin branch)

Iain

Reply via email to