modilib:add new args to modp record init arry
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
parent
e9550783d3
commit
9c191e93b7
|
@ -179,6 +179,8 @@ struct module_s
|
|||
|
||||
FAR struct module_s *dependencies[CONFIG_MODLIB_MAXDEPEND];
|
||||
#endif
|
||||
uintptr_t initarr; /* .init_array */
|
||||
uint16_t ninit; /* Number of entries in .init_array */
|
||||
uintptr_t finiarr; /* .fini_array */
|
||||
uint16_t nfini; /* Number of entries in .fini_array */
|
||||
};
|
||||
|
|
|
@ -332,6 +332,8 @@ FAR void *modlib_insert(FAR const char *filename, FAR const char *modname)
|
|||
array[i]();
|
||||
}
|
||||
|
||||
modp->initarr = loadinfo.initarr;
|
||||
modp->ninit = loadinfo.ninit;
|
||||
modp->finiarr = loadinfo.finiarr;
|
||||
modp->nfini = loadinfo.nfini;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue