STRUCT MODULE_ALIAS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so bestie, gather round β€” struct module_alias is literally the little struct that holds an auto-generated MODULE_ALIAS() πŸ’… that's it, that's the whole vibe.


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the shape of it, no cap β€” every field exactly as it appears, do not come for me:

struct module_alias {
    struct list_head node;
    char *builtin_modname;
    char str[];
};

πŸ’… Members πŸ’…

okay so this struct has three members and we're gonna go through them one by one, main character energy only:

  • node β€” this one gets linked up into module::aliases πŸ”— like it's getting added to the group chat, fr fr.
  • builtin_modname β€” a char * that's just sitting there in the struct 🫢 ngl the manpage does not say one single word about what it's for, so I'm not gonna make anything up. It exists. It's iconic. We respect it. ✨
  • str[] β€” a flexible array (yes bestie, char str[], no size, she's flexible πŸ’β€β™€οΈ) holding a string for MODULE_ALIAS. periodt.
lowkey important: str is a flexible array member β€” it's declared with empty brackets [] and it's the last thing in the struct. keep it exactly the way it's written up there, don't be out here adding numbers to it πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

go touch some other docs, iykyk:

  • Kernel file ./scripts/mod/modpost.h πŸŽ€ like, that's the actual source of truth, go look at it
  • struct module(9) β€” its bestie, the one that owns the aliases list 🌸

and that's the whole page, bestie πŸ“ no cap, it's short but she ate. source is ./scripts/mod, dated October 2026, and yes the page footer says struct module_alias(9) again because documentation loves a callback πŸ˜­πŸ’– bye ilysm, go read struct module(9) next 🌈⭐

πŸ“¦ where this page comes from