summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-06-22 22:42:21 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-06-22 22:42:21 +0000
commitb809a139fa845066eb21a2602f1642b98f841151 (patch)
treeaeaba3641cf4294f81e58b7a46ebf20af48271b5
parentf759cd068190d9a8820c1c4d57fbe03b85daa000 (diff)
downloadnuttx-b809a139fa845066eb21a2602f1642b98f841151.tar.gz
nuttx-b809a139fa845066eb21a2602f1642b98f841151.tar.bz2
nuttx-b809a139fa845066eb21a2602f1642b98f841151.zip
Back-out one relocation type
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1926 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/binfmt/libnxflat/libnxflat_bind.c54
-rw-r--r--nuttx/binfmt/libnxflat/libnxflat_load.c6
-rw-r--r--nuttx/binfmt/nxflat.c2
-rw-r--r--nuttx/include/nxflat.h10
4 files changed, 6 insertions, 66 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
/****************************************************************************
diff --git a/nuttx/include/nxflat.h b/nuttx/include/nxflat.h
index aab02963e..3f381bf6e 100644
--- a/nuttx/include/nxflat.h
+++ b/nuttx/include/nxflat.h
@@ -167,11 +167,6 @@ struct nxflat_reloc_s
* into D-Space at the the offset.
* Fixup: Add allocated D-Space address to the
* offset.
- * 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.
* NXFLAT_RELOC_TYPE_ABS32 Meaning: Offset refers to a struct nxflat_import_s
* describing a function pointer to be
* imported.
@@ -181,9 +176,8 @@ struct nxflat_reloc_s
#define NXFLAT_RELOC_TYPE_REL32I 0
#define NXFLAT_RELOC_TYPE_REL32D 1
-#define NXFLAT_RELOC_TYPE_REL32ID 2
-#define NXFLAT_RELOC_TYPE_ABS32 3
-#define NXFLAT_RELOC_TYPE_NUM 4 /* Number of relocation types */
+#define NXFLAT_RELOC_TYPE_ABS32 2
+#define NXFLAT_RELOC_TYPE_NUM 3 /* Number of relocation types */
/****************************************************************************
* NXFLAT Imported symbol type