Pinus,

Perhaps I do not entirely understand the process of splitting the code into 
sections.  Right now, all my code is in one file, ClueHints.c.  That's where I 
define the HANDLER_SECTION macro and where I declare and then define all the 
functions, some of which are now declared with the macro to put them in the new 
handlers section and some of which are not.  You mention accessibility from 
another file, so should I be using a separate .c file to do some of this work, 
or should any of this be in a .h file?  I apologize if I sound confused, but I 
have been using CodeWarrior for a long time before trying to do this port.  I 
tried removing the static label from the form handlers' function declarations 
and definitions within ClueHints.c (I didn't remove it from the other functions 
I intended to leave in the main section - should I?), but I got the same 
errors.  Thanks again for your help,

Martin

--------------------
Hi Reinfried,

It may be something quite simple.

Remove the static from the line

static Boolean ConfirmationFormHandleEvent (EventPtr) HANDLER_SECTION;

and any other function you want to be accessible from another file.

The static here is saying you want the function to have file scope (i.e. not
available globally). Unfortunately static has several different meanings in
C.

Apart from that I can't spot anything wrong.

Regards,

On 01/02/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > I suspect the most likely thing to have gone wrong is the
> >
> > myapp-sections.o: myapp-sections.s
> > m68k-palmos-gcc -c myapp-sections.s
> >
> > myapp-sections.s myapp-sections.ld: myapp.def
> > m68k-palmos-multigen myapp.def
> >
> >part of your Makefile. Did this part build properly?
> >
> > You might need to post cut down snippets of your headers, source, and
> > Makefile to get a better idea of what is going wrong.
>
> Thanks for the response. Makefile snippet:
>
> ...
> ClueHints-sections.o: ClueHints-sections.s
> m68k-palmos-gcc -c ClueHints-sections.s
>
> ClueHints-sections.s, ClueHints-sections.ld: ClueHints.def
> m68k-palmos-multigen ClueHints.def
> --------
>
> ClueHint-sections.s is created and looks like this:
>
> /* DO NOT EDIT!
> This file was automatically generated by m68k-palmos-multigen v2.3
> from ClueHints.def */
>
> .file "ClueHints-sections.s"
>
> .globl __text__
> .lcomm __text__,4
> .globl __text__handlers
> .lcomm __text__handlers,4
>
> .text
> .globl _GccRelocateData
> _GccRelocateData:
> bra.w _GccLoadCodeAndRelocateData
>
> .section ehook
> .long _GccReleaseCode
> -------
>
> In my ClueHints.c file, I have the following macro:
>
> #define HANDLER_SECTION __attribute__ ((section ("handlers")))
>
> In the same file, I declare my functions before defining them, using the
> macro for the form handlers that I want in the new section:
>
> ...
> static Boolean HandleAlarmDisplay(MemPtr);
> static Boolean ConfirmationFormHandleEvent(EventPtr) HANDLER_SECTION;
> ...
>
> The line that fails with the undefined reference errors is:
> m68k-palmos-gcc -T /usr/local/m68k-palmos/lib/text_64k -o ClueHints
> ClueHints.o ClueHints-sections.ld
>
> ClueHints-sections.ld looks like this:
>
> /* DO NOT EDIT!
> This file was automatically generated by m68k-palmos-multigen v2.3
> from ClueHints.def */
>
> MEMORY
> {
> handlersres : ORIGIN = 0x0, LENGTH = 32768
> }
>
> SECTIONS
> {
> handlers : { *(handlers) } > handlersres
> }
> -------
>
> Any help would be greatly apreciated!
>
> Martin
> --
> For information on using the PalmSource Developer Forums, or to
> unsubscribe, please see http://www.palmos.com/dev/support/forums/
>

-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to