Peal is an ELF postlinker and loader for Palm OS. It allows ARM code to use global variables and function pointers without restriction.
Peal version 2005-4-14
tar.gz archive (39 KB)
zip archive (68 KB)
New since version 2004-12-29:
See the release history for older versions and change logs.
Peal is distributed under a BSD-style license. See the README for complete license information.
Features supported by Peal and Peal-loaded ARM code:
PceNativeCall(), which is
only 4 KB by default. There are ways to increase the ARM stack size,
but Peal does not use any of them.
See the README for more details. The download package includes a complete example program.
postlink/ directory:
cd postlink; make
gEmulStateP and gCall68KFuncP from arm/pealstub.h.
unsigned long MyArmFunction(void *arg) { ... }
m68k/peal.h to load ARM code
and call ARM functions:
PealModule m = PealLoadFromResources('armc', 1000);
void *address = PealLookupSymbol(m, "MyArmFunction");
unsigned long result = PealCall(m, address, myArg);
PealUnload(m);
m68k/peal.c along with other m68k code.
-fPIC when compiling to compile all ARM code as position-independent:
arm-palmos-gcc -fPIC ...arm/pealstub.c along with other ARM code.
--emit-relocs when linking ARM code to preserve relocation information:
arm-palmos-ld --emit-relocs ...arm-palmos-gcc -Wl,--emit-relocs ...
peal-postlink -s 1000 -t armc -o postlinked-rsrcs.ro linked-binary.bin
peal-postlink to your Palm program as usual.
If you don't like Peal, there are several other tools that help provide a more full-featured ARM environment on Palm OS:
Greg Parker
gparker-peal2@sealiesoftware.com
Sealie Software