mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
binfmt/: Mostly cosmetic changes from review of a previous commit.
This commit is contained in:
+2
-3
@@ -154,9 +154,8 @@ static int builtin_loadbinary(struct binary_s *binp)
|
|||||||
* Name: builtin_initialize
|
* Name: builtin_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Builtin support is built unconditionally. However, in order to
|
* In order to use the builtin binary format, this function must be called
|
||||||
* use this binary format, this function must be called during system
|
* during system initialize to register the builtin binary format.
|
||||||
* initialzie in order to register the builtin binary format.
|
|
||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* This is a NuttX internal function so it follows the convention that
|
* This is a NuttX internal function so it follows the convention that
|
||||||
|
|||||||
+2
-3
@@ -321,9 +321,8 @@ errout:
|
|||||||
* Name: elf_initialize
|
* Name: elf_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* ELF support is built unconditionally. However, in order to
|
* In order to use the ELF binary format, this function must be called
|
||||||
* use this binary format, this function must be called during system
|
* during system initialization to register the ELF binary format.
|
||||||
* initialization in order to register the ELF binary format.
|
|
||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* This is a NuttX internal function so it follows the convention that
|
* This is a NuttX internal function so it follows the convention that
|
||||||
|
|||||||
+3
-3
@@ -235,9 +235,9 @@ errout:
|
|||||||
* Name: nxflat_initialize
|
* Name: nxflat_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* NXFLAT support is built unconditionally. However, in order to
|
* In order to use the NxFLAT binary format, this function must be called
|
||||||
* use this binary format, this function must be called during system
|
* during system initialization to register the NXFLAT binary
|
||||||
* initialization in order to register the NXFLAT binary format.
|
* format.
|
||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* This is a NuttX internal function so it follows the convention that
|
* This is a NuttX internal function so it follows the convention that
|
||||||
|
|||||||
+3
-3
@@ -62,6 +62,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Check configuration. This is not all of the configuration settings that
|
/* Check configuration. This is not all of the configuration settings that
|
||||||
* are required -- only the more obvious.
|
* are required -- only the more obvious.
|
||||||
*/
|
*/
|
||||||
@@ -522,9 +523,8 @@ static int pcode_unload(struct binary_s *binp)
|
|||||||
* Name: pcode_initialize
|
* Name: pcode_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* P-code support is built based on the configuration. However, in order
|
* In order to use the P-code binary format, this function must be called
|
||||||
* to use this binary format, this function must be called during system
|
* during system initialization to register the P-Code binary format.
|
||||||
* initialization in order to register the P-Code binary format.
|
|
||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* This is a NuttX internal function so it follows the convention that
|
* This is a NuttX internal function so it follows the convention that
|
||||||
|
|||||||
@@ -44,7 +44,6 @@
|
|||||||
#include <sys/mount.h>
|
#include <sys/mount.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
#include <nuttx/binfmt/elf.h>
|
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/clock.h>
|
#include <nuttx/clock.h>
|
||||||
#include <nuttx/kmalloc.h>
|
#include <nuttx/kmalloc.h>
|
||||||
|
|||||||
@@ -53,8 +53,6 @@
|
|||||||
# include <nuttx/usb/usbmonitor.h>
|
# include <nuttx/usb/usbmonitor.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <nuttx/binfmt/elf.h>
|
|
||||||
|
|
||||||
#include "stm32.h"
|
#include "stm32.h"
|
||||||
|
|
||||||
#ifdef CONFIG_STM32_OTGFS
|
#ifdef CONFIG_STM32_OTGFS
|
||||||
|
|||||||
@@ -61,7 +61,6 @@
|
|||||||
#include <nuttx/drivers/drivers.h>
|
#include <nuttx/drivers/drivers.h>
|
||||||
#include <nuttx/drivers/ramdisk.h>
|
#include <nuttx/drivers/ramdisk.h>
|
||||||
#include <nuttx/fs/nxffs.h>
|
#include <nuttx/fs/nxffs.h>
|
||||||
#include <nuttx/binfmt/elf.h>
|
|
||||||
#include <nuttx/i2c/i2c_master.h>
|
#include <nuttx/i2c/i2c_master.h>
|
||||||
|
|
||||||
#include "stm32l476vg-disco.h"
|
#include "stm32l476vg-disco.h"
|
||||||
|
|||||||
@@ -82,9 +82,8 @@ extern "C"
|
|||||||
* Name: builtin_initialize
|
* Name: builtin_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Builtin support is built unconditionally. However, in order to
|
* In order to use the builtin binary format, this function must be called
|
||||||
* use this binary format, this function must be called during system
|
* during system initialize to register the builtin binary format.
|
||||||
* initialzie in order to register the builtin binary format.
|
|
||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* This is a NuttX internal function so it follows the convention that
|
* This is a NuttX internal function so it follows the convention that
|
||||||
@@ -108,14 +107,11 @@ int builtin_initialize(void);
|
|||||||
|
|
||||||
void builtin_uninitialize(void);
|
void builtin_uninitialize(void);
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Utility Functions Provided to Applications by binfmt/libbuiltin
|
|
||||||
****************************************************************************/
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: builtin_isavail
|
* Name: builtin_isavail
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Checks for availabiliy of application registerred during compile time.
|
* Checks for availability of application registered during compile time.
|
||||||
*
|
*
|
||||||
* Input Parameters:
|
* Input Parameters:
|
||||||
* filename - Name of the linked-in binary to be started.
|
* filename - Name of the linked-in binary to be started.
|
||||||
@@ -147,9 +143,6 @@ int builtin_isavail(FAR const char *appname);
|
|||||||
|
|
||||||
FAR const char *builtin_getname(int index);
|
FAR const char *builtin_getname(int index);
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Data Set Access Functions Provided to Applications by binfmt/libbuiltin
|
|
||||||
****************************************************************************/
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: builtin_for_index
|
* Name: builtin_for_index
|
||||||
*
|
*
|
||||||
@@ -176,4 +169,3 @@ FAR const struct builtin_s *builtin_for_index(int index);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __INCLUDE_NUTTX_BINFMT_BUILTIN_H */
|
#endif /* __INCLUDE_NUTTX_BINFMT_BUILTIN_H */
|
||||||
|
|
||||||
|
|||||||
+26
-34
@@ -158,9 +158,34 @@ extern "C"
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* These are APIs exported by libelf (but are used only by the binfmt logic):
|
* 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);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: elf_init
|
* Name: elf_init
|
||||||
*
|
*
|
||||||
@@ -239,39 +264,6 @@ int elf_bind(FAR struct elf_loadinfo_s *loadinfo,
|
|||||||
|
|
||||||
int elf_unload(struct elf_loadinfo_s *loadinfo);
|
int elf_unload(struct elf_loadinfo_s *loadinfo);
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* These are APIs used outside of binfmt by NuttX:
|
|
||||||
****************************************************************************/
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: elf_initialize
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* ELF support is built unconditionally. However, in order to
|
|
||||||
* use this binary format, this function must be called during system
|
|
||||||
* initialization in order 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);
|
|
||||||
|
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,9 +130,35 @@ extern "C"
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* These are APIs exported by libnxflat (and may be used outside of NuttX):
|
* 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);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: nxflat_verifyheader
|
* Name: nxflat_verifyheader
|
||||||
*
|
*
|
||||||
@@ -246,39 +272,6 @@ int nxflat_bind(FAR struct nxflat_loadinfo_s *loadinfo,
|
|||||||
|
|
||||||
int nxflat_unload(struct nxflat_loadinfo_s *loadinfo);
|
int nxflat_unload(struct nxflat_loadinfo_s *loadinfo);
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* These are APIs used internally only by NuttX:
|
|
||||||
****************************************************************************/
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: nxflat_initialize
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* NXFLAT support is built unconditionally. However, in order to
|
|
||||||
* use this binary format, this function must be called during system
|
|
||||||
* initialization in order 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);
|
|
||||||
|
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,9 +66,8 @@ extern "C"
|
|||||||
* Name: pcode_initialize
|
* Name: pcode_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* P-code support is built based on the configuration. However, in order
|
* In order to use the P-code binary format, this function must be called
|
||||||
* to use this binary format, this function must be called during system
|
* during system initialization to register the P-Code binary format.
|
||||||
* initialization in order to register the P-Code binary format.
|
|
||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* This is a NuttX internal function so it follows the convention that
|
* This is a NuttX internal function so it follows the convention that
|
||||||
|
|||||||
Reference in New Issue
Block a user