summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-06-25 14:39:32 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-06-25 14:39:32 +0000
commit30e6de40af96d3f36f863716200d08d25106c41b (patch)
treefb4cc00da8482dfe88f0cfc3207366d9ccfd12ce
parent2a75b2d7b6eb3d1281db4a1679da78ce16a7f857 (diff)
downloadnuttx-30e6de40af96d3f36f863716200d08d25106c41b.tar.gz
nuttx-30e6de40af96d3f36f863716200d08d25106c41b.tar.bz2
nuttx-30e6de40af96d3f36f863716200d08d25106c41b.zip
Need to use GOTOFF offsets
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1949 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--misc/buildroot/toolchain/nxflat/arm/dyncall_skeleton.def10
-rw-r--r--misc/buildroot/toolchain/nxflat/readnxflat.c2
-rw-r--r--misc/buildroot/toolchain/nxflat/thumb2/dyncall_skeleton.def10
3 files changed, 12 insertions, 10 deletions
diff --git a/misc/buildroot/toolchain/nxflat/arm/dyncall_skeleton.def b/misc/buildroot/toolchain/nxflat/arm/dyncall_skeleton.def
index 3d4b3d735..fbe8b5081 100644
--- a/misc/buildroot/toolchain/nxflat/arm/dyncall_skeleton.def
+++ b/misc/buildroot/toolchain/nxflat/arm/dyncall_skeleton.def
@@ -146,7 +146,7 @@ static const char dyncall_decl_prologue[] =
#define MKCALLARGS(fn, i) (fn), (fn), (fn), (fn), (i), (i), (i), (fn), (fn)
-#ifdef __USE_GOT__
+#ifndef __NO_GOT__
static const char dyncall_format[] =
"\n/* Dynamic call logic for imported symbol %s */\n\n"
@@ -154,11 +154,11 @@ static const char dyncall_format[] =
"\t.type\t%s, function\n\n"
"%s:\n"
"\tldr\tip,.Ldyn%04d\n"
- "\tldr\tip,[sl,ip]\n"
+ "\tadd\tip,ip,sl\n"
"\tldr\tip,[ip,#4]\n"
"\tbx\tip\n"
".Ldyn%04d:\n"
- "\t.word\t__dyninfo%04d(GOT)\n"
+ "\t.word\t__dyninfo%04d(GOTOFF)\n"
"\t.size\t%s, .-%s\n";
static const char nonreturning_dyncall_format[] =
@@ -167,11 +167,11 @@ static const char nonreturning_dyncall_format[] =
"\t.type\t%s, function\n\n"
"%s:\n"
"\tldr\tip,.Ldyn%04d\n"
- "\tldr\tip,[sl,ip]\n"
+ "\tadd\tip,ip,sl\n"
"\tldr\tip,[ip,#4]\n"
"\tbx\tip\n"
".Ldyn%04d:\n"
- "\t.word\t__dyninfo%04d(GOT)\n"
+ "\t.word\t__dyninfo%04d(GOTOFF)\n"
"\t.size\t%s, .-%s\n";
#else
diff --git a/misc/buildroot/toolchain/nxflat/readnxflat.c b/misc/buildroot/toolchain/nxflat/readnxflat.c
index 81b5b05b2..c5d5a6366 100644
--- a/misc/buildroot/toolchain/nxflat/readnxflat.c
+++ b/misc/buildroot/toolchain/nxflat/readnxflat.c
@@ -67,11 +67,13 @@
/***********************************************************************
* Definitions
***********************************************************************/
+
#define NXFLAT_HDR_SIZE sizeof(struct nxflat_hdr_s)
/***********************************************************************
* Private Data
***********************************************************************/
+
static const char *program_name;
static const char *nxflat_filename;
diff --git a/misc/buildroot/toolchain/nxflat/thumb2/dyncall_skeleton.def b/misc/buildroot/toolchain/nxflat/thumb2/dyncall_skeleton.def
index 1c4d0c387..e0d014490 100644
--- a/misc/buildroot/toolchain/nxflat/thumb2/dyncall_skeleton.def
+++ b/misc/buildroot/toolchain/nxflat/thumb2/dyncall_skeleton.def
@@ -148,7 +148,7 @@ static const char dyncall_decl_prologue[] =
#define MKCALLARGS(fn, i) (fn), (fn), (fn), (fn), (i), (i), (i), (fn), (fn)
-#ifdef __USE_GOT__
+#ifndef __NO_GOT__
static const char dyncall_format[] =
"\n/* Dynamic call logic for imported symbol %s */\n\n"
@@ -157,11 +157,11 @@ static const char dyncall_format[] =
"\t.thumb_func\n\n"
"%s:\n"
"\tldr\tip,.Ldyn%04d\n"
- "\tldr\tip,[sl,ip]\n"
+ "\tadd\tip,ip,sl\n"
"\tldr\tip,[ip,#4]\n"
"\tbx\tip\n"
".Ldyn%04d:\n"
- "\t.word\t__dyninfo%04d(GOT)\n"
+ "\t.word\t__dyninfo%04d(GOTOFF)\n"
"\t.size\t%s, .-%s\n";
static const char nonreturning_dyncall_format[] =
@@ -171,11 +171,11 @@ static const char nonreturning_dyncall_format[] =
"\t.thumb_func\n\n"
"%s:\n"
"\tldr\tip,.Ldyn%04d\n"
- "\tldr\tip,[sl,ip]\n"
+ "\tadd\tip,ip,sl\n"
"\tldr\tip,[ip,#4]\n"
"\tbx\tip\n"
".Ldyn%04d:\n"
- "\t.word\t__dyninfo%04d(GOT)\n"
+ "\t.word\t__dyninfo%04d(GOTOFF)\n"
"\t.size\t%s, .-%s\n";
#else