diff options
Diffstat (limited to 'nuttx/binfmt')
-rw-r--r-- | nuttx/binfmt/libnxflat/libnxflat_bind.c | 54 | ||||
-rw-r--r-- | nuttx/binfmt/libnxflat/libnxflat_load.c | 6 | ||||
-rw-r--r-- | nuttx/binfmt/nxflat.c | 2 |
3 files changed, 4 insertions, 58 deletions
diff --git a/nuttx/binfmt/libnxflat/libnxflat_bind.c b/nuttx/binfmt/libnxflat/libnxflat_bind.c index 6d96ab6e3..721e4bdb4 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_bind.c +++ b/nuttx/binfmt/libnxflat/libnxflat_bind.c @@ -145,47 +145,6 @@ static inline int nxflat_bindrel32d(FAR struct nxflat_loadinfo_s *loadinfo, } /**************************************************************************** - * Name: nxflat_bindrel32id - * - * Description: - * Perform the NXFLAT_RELOC_TYPE_REL32ID binding: - * - * Meaning: Object file contains a 32-bit offsetinto I-Space at the the - * offset, but will be referenced as data - * Fixup: Add mapped I-Space address - allocated D-Space address to the - * offset. - * - * Returned Value: - * 0 (OK) is returned on success and a negated errno is returned on - * failure. - * - ****************************************************************************/ - -static inline int nxflat_bindrel32id(FAR struct nxflat_loadinfo_s *loadinfo, - uint32 offset) -{ - uint32 *addr; - - bvdbg("NXFLAT_RELOC_TYPE_REL32I Offset: %08x I-Space: %p D-Space: %p\n", - offset, loadinfo->ispace, loadinfo->dspace->region); - - if (offset < loadinfo->dsize) - { - addr = (uint32*)(offset + loadinfo->dspace->region); - bvdbg(" Before: %08x\n", *addr); - *addr += ((uint32)(loadinfo->ispace) - (uint32)(loadinfo->dspace->region)); - bvdbg(" After: %08x\n", *addr); - return OK; - } - else - { - bdbg("Offset: %08 does not lie in D-Space size: %08x\n", - offset, loadinfo->dsize); - return -EINVAL; - } -} - -/**************************************************************************** * Name: nxflat_gotrelocs * * Description: @@ -264,19 +223,6 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo) } break; - /* NXFLAT_RELOC_TYPE_REL32ID Meaning: Object file contains a 32-bit offset - * into I-Space at the the offset, but will - * be referenced as data - * Fixup: Add mapped I-Space address - allocated - * D-Space address to the offset. - */ - - case NXFLAT_RELOC_TYPE_REL32ID: - { - result = nxflat_bindrel32id(loadinfo, NXFLAT_RELOC_OFFSET(reloc.r_info)); - } - break; - /* NXFLAT_RELOC_TYPE_ABS32 Meaning: Offset refers to a struct nxflat_import_s * describing a function pointer to be * imported. diff --git a/nuttx/binfmt/libnxflat/libnxflat_load.c b/nuttx/binfmt/libnxflat/libnxflat_load.c index 54b87992c..022ad7f7d 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_load.c +++ b/nuttx/binfmt/libnxflat/libnxflat_load.c @@ -64,15 +64,15 @@ #if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_BINFMT) static const char g_relocrel32i[] = "RELOC_REL32I"; static const char g_relocrel32d[] = "RELOC_REL32D"; -static const char g_relocrel32id[] = "RELOC_REL32ID"; static const char g_relocabs32[] = "RELOC_AB32"; +static const char g_undefined[] = "UNDEFINED"; static const char *g_reloctype[] = { g_relocrel32i, g_relocrel32d, - g_relocrel32id, - g_relocabs32 + g_relocabs32. + g_undefined }; # define RELONAME(rl) g_reloctype[NXFLAT_RELOC_TYPE(rl)] #else diff --git a/nuttx/binfmt/nxflat.c b/nuttx/binfmt/nxflat.c index 20795dae4..f712422f2 100644 --- a/nuttx/binfmt/nxflat.c +++ b/nuttx/binfmt/nxflat.c @@ -95,7 +95,7 @@ static void nxflat_dumpmemory(void *addr, int nbytes) } } #else -# define nnxflat_dumpmemory(a,n) +# define nxflat_dumpmemory(a,n) #endif /**************************************************************************** |