diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-06-19 00:40:49 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-06-19 00:40:49 +0000 |
commit | 0a6be182faeb019005ae4ba151821f298bd89c94 (patch) | |
tree | bf4631a0bf2f32a038fb215760bf1f62eac122ec /misc | |
parent | a6a3e674b4a5d9cfcc47dfda357a5bf4b6dacf10 (diff) | |
download | px4-nuttx-0a6be182faeb019005ae4ba151821f298bd89c94.tar.gz px4-nuttx-0a6be182faeb019005ae4ba151821f298bd89c94.tar.bz2 px4-nuttx-0a6be182faeb019005ae4ba151821f298bd89c94.zip |
Fix PIC offsets in thunk routines
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1908 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'misc')
-rw-r--r-- | misc/buildroot/toolchain/nxflat/arm/dyncall_skeleton.def | 14 | ||||
-rw-r--r-- | misc/buildroot/toolchain/nxflat/thumb2/dyncall_skeleton.def | 14 |
2 files changed, 22 insertions, 6 deletions
diff --git a/misc/buildroot/toolchain/nxflat/arm/dyncall_skeleton.def b/misc/buildroot/toolchain/nxflat/arm/dyncall_skeleton.def index 08faf1624..ce5ea0ad3 100644 --- a/misc/buildroot/toolchain/nxflat/arm/dyncall_skeleton.def +++ b/misc/buildroot/toolchain/nxflat/arm/dyncall_skeleton.def @@ -144,7 +144,7 @@ static const char dyncall_decl_prologue[] = "\t.text\n" "\t.align\t2\n"; -#define MKCALLARGS(fn, i) (fn), (fn), (fn), (fn), (i), (fn), (fn) +#define MKCALLARGS(fn, i) (fn), (fn), (fn), (fn), (i), (fn), (fn), (i), (i) static const char dyncall_format[] = "\n/* Dynamic call logic for imported symbol %s */\n\n" @@ -152,9 +152,13 @@ static const char dyncall_format[] = "\t.type\t%s, function\n\n" "%s:\n" "\tstmdb\tsp!,{r4, lr}\n" - "\tldr\tr4, =__dyninfo%04d\n" + "\tldr\tr4,.Ldyn%04d\n" + "\tldr\tr4,[sl,r4]\n" + "\tldr\tr4,[r4,#0]\n" "\tblx\tr4\n" "\tldmia\tsp!,{r4, pc}\n" + ".Ldyn%04d:\n" + "\t.word\t__dyninfo%04d(GOT)\n" "\t.size\t%s, .-%s\n"; static const char nonreturning_dyncall_format[] = @@ -162,8 +166,12 @@ static const char nonreturning_dyncall_format[] = "\t.global\t%s\n" "\t.type\t%s, function\n\n" "%s:\n" - "\tldr\tr4, =__dyninfo%04d\n" + "\tldr\tr4,.Ldyn%04d\n" + "\tldr\tr4,[sl,r4]\n" + "\tldr\tr4,[r4,#0]\n" "\tbx\tr4\n" + ".Ldyn%04d:\n" + "\t.word\t__dyninfo%04d(GOT)\n" "\t.size\t%s, .-%s\n"; /******************************************************************* diff --git a/misc/buildroot/toolchain/nxflat/thumb2/dyncall_skeleton.def b/misc/buildroot/toolchain/nxflat/thumb2/dyncall_skeleton.def index 2f0980ee1..bc7c7f076 100644 --- a/misc/buildroot/toolchain/nxflat/thumb2/dyncall_skeleton.def +++ b/misc/buildroot/toolchain/nxflat/thumb2/dyncall_skeleton.def @@ -146,7 +146,7 @@ static const char dyncall_decl_prologue[] = "\t.text\n" "\t.align\t2\n"; -#define MKCALLARGS(fn, i) (fn), (fn), (fn), (fn), (i), (fn), (fn) +#define MKCALLARGS(fn, i) (fn), (fn), (fn), (fn), (i), (i), (i), (fn), (fn) static const char dyncall_format[] = "\n/* Dynamic call logic for imported symbol %s */\n\n" @@ -155,9 +155,13 @@ static const char dyncall_format[] = "\t.thumb_func\n\n" "%s:\n" "\tstmdb\tsp!,{r4, lr}\n" - "\tldr\tr4, =__dyninfo%04d\n" + "\tldr\tr4,.Ldyn%04d\n" + "\tldr\tr4,[sl,r4]\n" + "\tldr\tr4,[r4,#0]\n" "\tblx\tr4\n" "\tldmia\tsp!,{r4, pc}\n" + ".Ldyn%04d:\n" + "\t.word\t__dyninfo%04d(GOT)\n" "\t.size\t%s, .-%s\n"; static const char nonreturning_dyncall_format[] = @@ -166,8 +170,12 @@ static const char nonreturning_dyncall_format[] = "\t.type\t%s, function\n" "\t.thumb_func\n\n" "%s:\n" - "\tldr\tr4, =__dyninfo%04d\n" + "\tldr\tr4,.Ldyn%04d\n" + "\tldr\tr4,[sl,r4]\n" + "\tldr\tr4,[r4,#0]\n" "\tbx\tr4\n" + ".Ldyn%04d:\n" + "\t.word\t__dyninfo%04d(GOT)\n" "\t.size\t%s, .-%s\n"; /******************************************************************* |