binfmt: Move [elf|nxflat]_[un]initialize to private header file

like what builtin binary format do

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2023-07-09 04:39:31 +08:00
committed by Petro Karashchenko
parent 899471c6bd
commit 229293f9f8
7 changed files with 76 additions and 73 deletions

View File

@@ -165,6 +165,7 @@ void binfmt_freeargv(FAR char * const *argv);
# define binfmt_freeenv(envp)
#endif
#ifdef CONFIG_BUILTIN
/****************************************************************************
* Name: builtin_initialize
*
@@ -179,9 +180,7 @@ void binfmt_freeargv(FAR char * const *argv);
*
****************************************************************************/
#ifdef CONFIG_BUILTIN
int builtin_initialize(void);
#endif
/****************************************************************************
* Name: builtin_uninitialize
@@ -194,10 +193,72 @@ int builtin_initialize(void);
*
****************************************************************************/
#ifdef CONFIG_BUILTIN
void builtin_uninitialize(void);
#endif
#ifdef CONFIG_ELF
/****************************************************************************
* Name: elf_initialize
*
* Description:
* In order to use the ELF binary format, this function must be called
* during system initialization to register the ELF binary format.
*
* Returned Value:
* This is a NuttX internal function so it follows the convention that
* 0 (OK) is returned on success and a negated errno is returned on
* failure.
*
****************************************************************************/
int elf_initialize(void);
/****************************************************************************
* Name: elf_uninitialize
*
* Description:
* Unregister the ELF binary loader
*
* Returned Value:
* None
*
****************************************************************************/
void elf_uninitialize(void);
#endif
#ifdef CONFIG_NXFLAT
/****************************************************************************
* Name: nxflat_initialize
*
* Description:
* In order to use the NxFLAT binary format, this function must be called
* during system initialization to register the NXFLAT binary
* format.
*
* Returned Value:
* This is a NuttX internal function so it follows the convention that
* 0 (OK) is returned on success and a negated errno is returned on
* failure.
*
****************************************************************************/
int nxflat_initialize(void);
/****************************************************************************
* Name: nxflat_uninitialize
*
* Description:
* Unregister the NXFLAT binary loader
*
* Returned Value:
* None
*
****************************************************************************/
void nxflat_uninitialize(void);
#endif
#undef EXTERN
#if defined(__cplusplus)
}