[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240803183259.GA29716@1wt.eu>
Date: Sat, 3 Aug 2024 20:32:59 +0200
From: Willy Tarreau <w@....eu>
To: Thomas Weißschuh <thomas@...ch.de>
Cc: Thomas Weißschuh <linux@...ssschuh.net>,
Shuah Khan <shuah@...nel.org>, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH 04/12] tools/nolibc: use attribute((naked)) if available
On Sat, Aug 03, 2024 at 08:28:08PM +0200, Thomas Weißschuh wrote:
> > I think that it can resolve to roughly this:
> >
> > #if defined(__has_attribute) && __has_attribute(naked)
> > # define __entrypoint __attribute__((naked))
> > # define __entrypoint_epilogue()
> > #else
> > # define __entrypoint __attribute__((optimize("Os", "omit-frame-pointer")))
> > # define __entrypoint_epilogue() __builtin_unreachable()
> > #endif
>
> We would need to duplicate the define for the
> !defined(__has_attribute) case.
I don't understand why. Above both are tested on the first line.
Am I missing something ?
> I wanted to avoid that duplication.
> > What do you think ?
>
> With the reasoning above I'll let you choose.
I'm fine with avoiding duplication, I just don't understand why there
should be.
Willy
Powered by blists - more mailing lists