Re: [PATCH 03/12] tools/nolibc: move entrypoint specifics to compiler.h
From: Thomas Weißschuh
Date: Sat Aug 03 2024 - 14:26:42 EST
Aug 3, 2024 11:22:23 Willy Tarreau <w@xxxxxx>:
> Hi Thomas,
>
> On Sun, Jul 28, 2024 at 12:09:57PM +0200, Thomas Weißschuh wrote:
>> The specific attributes for the _start entrypoint are duplicated for
>> each architecture.
>> Deduplicate it into a dedicated #define into compiler.h.
>> This make the code shorter and will make it easier to adapt for clang
>> compatibility.
>>
>> For clang compatibility, the epilogue will also need to be adapted, so
>> move that one, too.
>
> I'm fine with the general approach, however I think that if we start to
> add specific attributes and macros like this, we should prefix them with
> "nolibc" to make sure they won't collide with userland.
Ack.
FYI for v2 I intend to rename the macros to
__nolibc_naked, as I have a followup series that needs
them also for the non-entrypoint asm functions in
arch-x86_64.
> Thanks,
> willy