binfmt: Remove filename/exports/nexports from binary_s

to simplify the life cycle management

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2021-05-24 17:12:06 +08:00
committed by Masayuki Ishikawa
parent cf78a5b6cf
commit bebdbc5c87
8 changed files with 61 additions and 60 deletions
+2 -8
View File
@@ -86,15 +86,9 @@ int exec_spawn(FAR const char *filename, FAR char * const *argv,
goto errout;
}
/* Initialize the binary structure */
bin->filename = filename;
bin->exports = exports;
bin->nexports = nexports;
/* Load the module into memory */
ret = load_module(bin);
ret = load_module(bin, filename, exports, nexports);
if (ret < 0)
{
berr("ERROR: Failed to load program '%s': %d\n", filename, ret);
@@ -127,7 +121,7 @@ int exec_spawn(FAR const char *filename, FAR char * const *argv,
/* Then start the module */
pid = exec_module(bin, argv);
pid = exec_module(bin, filename, argv);
if (pid < 0)
{
ret = pid;