mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 16:11:45 +00:00
modpost: add support for generating namespace dependencies
This patch adds an option to modpost to generate a <module>.ns_deps file per module, containing the namespace dependencies for that module. E.g. if the linked module my-module.ko would depend on the symbol myfunc.MY_NS in the namespace MY_NS, the my-module.ns_deps file created by modpost would contain the entry MY_NS to express the namespace dependency of my-module imposed by using the symbol myfunc. These files can subsequently be used by static analysis tools (like coccinelle scripts) to address issues with missing namespace imports. A later patch of this series will introduce such a script 'nsdeps' and a corresponding make target to automatically add missing MODULE_IMPORT_NS() definitions to the module's sources. For that it uses the information provided in the generated .ns_deps files. Co-developed-by: Martijn Coenen <maco@android.com> Signed-off-by: Martijn Coenen <maco@android.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Matthias Maennich <maennich@google.com> Signed-off-by: Jessica Yu <jeyu@kernel.org>
This commit is contained in:
parent
8e2adc6a00
commit
1d082773ff
4 changed files with 53 additions and 6 deletions
|
@ -126,6 +126,8 @@ struct module {
|
|||
struct buffer dev_table_buf;
|
||||
char srcversion[25];
|
||||
int is_dot_o;
|
||||
// Required namespace dependencies
|
||||
struct namespace_list *required_namespaces;
|
||||
// Actual imported namespaces
|
||||
struct namespace_list *imported_namespaces;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue