This is an automated email from the ASF dual-hosted git repository. masayuki pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 4c76c356ef55c7e4f2bb26dad3a69a3ceead6a92 Author: chao.an <anc...@xiaomi.com> AuthorDate: Mon Nov 22 10:08:31 2021 +0800 arch/arm: add more arch elf define Signed-off-by: chao.an <anc...@xiaomi.com> --- arch/arm/include/elf.h | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/elf.h b/arch/arm/include/elf.h index fb87e2c..e74fbf4 100644 --- a/arch/arm/include/elf.h +++ b/arch/arm/include/elf.h @@ -37,8 +37,13 @@ * ELFDATA2MSB (big endian) */ -#if 0 /* Defined in include/elf32.h */ -#define EM_ARM 40 +#define EM_ARCH EM_ARM +#define ELF_CLASS ELFCLASS32 + +#ifdef CONFIG_ENDIAN_BIG +# define ELF_DATA ELFDATA2MSB +#else +# define ELF_DATA ELFDATA2LSB #endif /* Table 4-2, ARM-specific e_flags */ @@ -53,6 +58,21 @@ #define EF_ARM_BE8 0x00800000 +#define EF_ARM_ABI_FLOAT_SOFT 0x00000200 +#define EF_ARM_ABI_FLOAT_HARD 0x00000400 + +#ifdef __VFP_FP__ +# ifdef __ARM_PCS_VFP +# define EF_ARM_ABI_FLOAT EF_ARM_ABI_FLOAT_HARD +# else +# define EF_ARM_ABI_FLOAT EF_ARM_ABI_FLOAT_SOFT +# endif +#else +# define EF_ARM_ABI_FLOAT 0 +#endif + +#define EF_FLAG (EF_ARM_EABI_VER5 | EF_ARM_ABI_FLOAT) + /* Table 4-4, Processor specific section types */ #define SHT_ARM_EXIDX 0x70000001 /* Exception Index table */