Hi,
I was experiencing linker "relocation" errors when I was trying to
build my palm app (written in C, using pilrc and prc-tools)
My code is split up among different .c files with associated header
files. One file contains the PilotMain and UI functions (such as
form handlers, etc). This file makes function calls to the other
files which contain the functions for various calculations.
I've followed the instructions on the prc-tools website on how to
multisegment an app. As instructed, I specified the function
attributes for the functions that I wanted to move into the new code
segment.
This took care of the linker errors but now build-prc is not able to
process my BFD executable, showing me the following:
build-prc myapp.prc myapp.def myapp *.bin
myapp.prc: resource 'code' #1 is missing
make: *** [myapp.prc] Error 1
The following is an excerpt from my makefile:
...
OBJS = file1.o file2.o file3.o MathLib.o myapp-sections.o
CFLAGS = -Wl,-Map -Wl,myfile.map
myapp.prc: bin.stamp myapp myapp.def
build-prc myapp.prc myapp.def myapp *.bin
ls -l *.prc
myapp: $(OBJS) myapp-sections.ld
gcc $(CFLAGS) -o myapp $(OBJS) myapp-sections.ld
myapp-sections.o: myapp-sections.s
gcc -c myapp-sections.s
myapp-sections.s myapp-sections.ld: myapp.def
multigen myapp.def
%.o: ../Src/%.c ../Src/%.h
gcc -c $<
...
file1.c contains the PilotMain and makes calls to functions in the
other files. The functions I have moved into the new segment are
from file2.c and file3.c
An excerpt from Myapp.def:
...
multiple code { section1 }
...
Can anyone please tell me what I'm doing wrong? I'm spent a lot of
time analyzing my steps in the multisegmenting and reading forum
questions, etc. but to no avail.
Any help on the issue would be most sincerely appreciated.
Thank you.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/