elf: Replace {0x7f, 'E', 'L', 'F'} to EI_MAGIC
to avoid the duplication of the magic number. Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
3cee81af6d
commit
7bb97f7e22
@ -39,10 +39,7 @@
|
|||||||
* Private Constant Data
|
* Private Constant Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static const char g_elfmagic[EI_MAGIC_SIZE] =
|
static const char g_elfmagic[EI_MAGIC_SIZE] = EI_MAGIC;
|
||||||
{
|
|
||||||
0x7f, 'E', 'L', 'F'
|
|
||||||
};
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
|
||||||
#include <nuttx/elf.h>
|
#include <nuttx/elf.h>
|
||||||
#include <nuttx/lib/modlib.h>
|
#include <nuttx/lib/modlib.h>
|
||||||
|
|
||||||
@ -36,10 +35,7 @@
|
|||||||
* Private Constant Data
|
* Private Constant Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static const char g_modmagic[EI_MAGIC_SIZE] =
|
static const char g_modmagic[EI_MAGIC_SIZE] = EI_MAGIC;
|
||||||
{
|
|
||||||
0x7f, 'E', 'L', 'F'
|
|
||||||
};
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
|
Loading…
Reference in New Issue
Block a user