We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3139a1c commit ebf17b0Copy full SHA for ebf17b0
2 files changed
include/module.h
@@ -127,6 +127,8 @@ typedef struct elf_rela {
127
typedef bool (*module_init_fn)(void); /**< Prototype for module initialiser */
128
typedef void (*module_exit_fn)(void); /**< Prototype for module finaliser */
129
130
+#define EXPORTED __attribute__((visibility("default")))
131
+
132
/**
133
* @brief Describes a loaded and relocated module image
134
*
modules/test/test.c
@@ -1,10 +1,10 @@
1
#include <kernel.h>
2
3
-bool mod_init(void) {
+bool EXPORTED mod_init(void) {
4
dprintf("test.ko: mod_init called!\n");
5
return true;
6
}
7
8
-void mod_exit(void) {
+void EXPORTED mod_exit(void) {
9
dprintf("test.ko: mod_exit called!\n");
10
0 commit comments