# Re: \[PATCH v3 3/6\] modpost: Make mod\_device\_table aliases more unique

- From: Masahiro Yamada \<masahiroy@kernel.org\>
- Date: 2025-06-02 07:53:14 
- List: linux-modules
- Page: https://ratatoskr.run/linux-modules/2025/06/3076313
- Thread: https://ratatoskr.run/linux-modules/2025/05/3070058/t.md

```text
On Tue, May 27, 2025 at 6:08 PM Alexey Gladkov [ref] wrote:
>
> In order to avoid symbol conflicts if they appear in the same binary, a
> more unique alias identifier can be generated.
>
> Signed-off-by: Alexey Gladkov <legion@kernel.org>
> Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
> ---
>  include/linux/module.h   | 14 ++++++++++++--
>  scripts/mod/file2alias.c | 18 ++++++++++++++----
>  2 files changed, 26 insertions(+), 6 deletions(-)
>
> diff --git a/include/linux/module.h b/include/linux/module.h
> index 88048561360f..e7506684069d 100644
> --- a/include/linux/module.h
> +++ b/include/linux/module.h
> @@ -249,10 +249,20 @@ struct module_kobject *lookup_or_create_module_kobject(const char *name);
>  /* What your module does. */
>  #define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
>
> +/* Format: __mod_device_table__<counter>__kmod_<modname>__<type>__<name> */

This format relies on module-name mangling, but
I hope we will be able to stop doing it some day.

Can we come up with a different idea
in case <modname> contains hyphens?








--
Best Regards
Masahiro Yamada
```
