Re: [PATCH v2 1/6] rust: module: add static pointer to `{init,cleanup}_module()`

From: Gary Guo
Date: Tue Jul 30 2024 - 07:18:24 EST


On Thu, 25 Jul 2024 19:47:13 +0200
Miguel Ojeda <ojeda@xxxxxxxxxx> wrote:

> On Wed, 24 Jul 2024 20:46:49 +0100 Gary Guo <gary@xxxxxxxxxxx> wrote:
> >
> > Should this be in section `.discard.addressable` instead?
>
> No, we need to mimic the call to `___ADDRESSABLE()` (i.e. the one with
> 3 underscores, not 2), which passes `__{init,exit}data`.
>
> By the way, thanks for the reviews Gary!
>
> Cheers,
> Miguel

You're right. It's a bit difficult to navigate macros :)

In this case I think this indeed matches the C implementation.

Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>

Thanks,
Gary