diff options
author | Peng Fan <van.freenix@gmail.com> | 2013-07-22 10:32:42 +0800 |
---|---|---|
committer | Peng Fan <van.freenix@gmail.com> | 2013-09-05 13:47:39 +0800 |
commit | 08324d8525c6f5e04a7278296e39fa1ae215823a (patch) | |
tree | 47fb6ebe36835dc69ee019beeba8af88ac6aba2f /testcase | |
parent | 2053ce659489720a98ef33ced6b2e63721cbc3f4 (diff) |
More m68k reloc support
Signed-off-by: Peng Fan <van.freenix@gmail.com>
Diffstat (limited to 'testcase')
-rw-r--r-- | testcase/1.c | 15 | ||||
-rw-r--r-- | testcase/Readme | 11 | ||||
-rw-r--r-- | testcase/wscript | 11 |
3 files changed, 37 insertions, 0 deletions
diff --git a/testcase/1.c b/testcase/1.c index 58903bc..f3ba414 100644 --- a/testcase/1.c +++ b/testcase/1.c @@ -50,7 +50,11 @@ void hello(int arg) #endif default: +#if defined (__m68k__) + printf("M68K PC16 pass\n"); +#else printf("no arg in hello\n"); +#endif return; } } @@ -306,6 +310,17 @@ int rtems(int argc, char **argv) printf("R_M32R_32_RELA, .word global pass\n"); #endif + +#elif defined (__m68k__) + __asm__ volatile ( + ".align 2\n\t" + "subal #4, %%a7\n\t" + "lea 1f, %%a0\n\t" + "movel %%a0, %%a7@(0)\n\t" + "bra hello\n\t" /* R_68K_PC16 */ + "1:\n\t" + "nop\n\t" : : :"a0", "a1" + ); #else /* other archs */ #endif diff --git a/testcase/Readme b/testcase/Readme index 5735dc2..ab95292 100644 --- a/testcase/Readme +++ b/testcase/Readme @@ -59,3 +59,14 @@ m32r: Simulator: m32rsim-gdb build/m32r-rtems4.11-m32rsim/rtld + +M68K: + Use the following two patchs and patch them to qemu-0.11.0-rc1 + http://lists.nongnu.org/archive/html/qemu-devel/2009-09/msg00811.html + http://lists.nongnu.org/archive/html/qemu-devel/2009-09/msg00353.html + + http://www.rtems.org/pipermail/rtems-users/2009-September/005941.html shows how + to compile and run. + + Simulator: + qemu-system-m68k -M uc5282 -nographic -kernel build/m68k-rtems4.11-uC5282/rtld diff --git a/testcase/wscript b/testcase/wscript index cad0613..b455b4e 100644 --- a/testcase/wscript +++ b/testcase/wscript @@ -121,6 +121,17 @@ def build(bld): '--entry', 'my_main'], source = ['1.c', '2.c']) + elif arch == 'm68k': + bld(target = 'test.rap', + features = 'c rap', + xxxx = 'hello', + + cflags = '-fno-common', + + rtems_linkflags = ['--base', 'rtld.prelink', + '--entry', 'my_main'], + source = ['1.c', '2.c']) + bld(target = '../test.rap', source = ['test.rap'], rule = 'cp ${SRC} ${TGT}') |