Re: [GIT PULL] compiler-attributes for v5.3-rc8

From: Miguel Ojeda
Date: Thu Sep 05 2019 - 15:41:05 EST


On Thu, Sep 5, 2019 at 6:20 PM Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> Macro stringification isn't entirely obvious, and an unquoted string
> could become corrupted if the stringification ends up not happening
> immediately.

Nick, Linus: shouldn't we just simply go for no stringifying at all,
i.e. changing it to:

#define __section(S) __attribute__((__section__(S)))

That way we can handle both easy things like:

__section("foo")

as well as the mentioned:

__section(".initcall" level ".init")

that we couldn't do before.

Both GCC and Clang give the same result and it is also easier to
reason about it.

Cheers,
Miguel