On 19.06.2023 18:29, Shawn Anastasio wrote:
> On 6/19/23 11:07 AM, Jan Beulich wrote:
>>> Good point. Following the example in the Power ELFv2 ABI
>>> specification [1] for function type annotation, I'll place
>>>
>>> .type start, @function
>>>
>>> in the ENTRY macro. It's not clear what the difference between %function
>>> and @function are in this context (my toolchain seems to accept both and
>>> produce the same ELF metadata), but the latter is more idiomatic in
>>> Power assembly. The same goes for its placement before the entrypoint
>>> vs. after the last instruction.
>>
>> % and @ are entirely the same here, except for targets like arm-*,
>> where @ starts a comment.
> 
> Okay, thanks for the confirmation. Is there a preference for which one
> is used? I'd lean towards @ just for the sake of remaining idiomatic,
> but since they're equivalent it doesn't really matter from my
> perspective.

In arch specific code your fine to use what you think is a better fit.
There's a proposal though to make these ELF annotations arch-independent,
and if we went that route, we'd have to use % (or allow arch overrides)
to fit all architectures.

Jan

Reply via email to