In article <81358@palm-dev-forum>, [EMAIL PROTECTED] says...
> 
>   dont need an explict compiler for this.. :) you can do this yourself,
>   as long as you know what your doing. *g* - if you use gcc, its a bit
>   easier than CW, cause CW puts 8 bytes of crap at the beginning of a
>   segment (ben, you never answered how to disable that) :P

There are two different things going on.

1) If you create a code segment target (like for a shared library), the 
start of the segment will be a jump instruction that goes to the real 
entry point.  In the map file, this is called "__DummyStartup__".  So, 
CW code segments should work just fine if you jump to address 0 from the 
start.  This method gives our linker more flexibility in placing the 
real startup code within the resource.

It would be a nice optimization for the linker to just put the entry 
point first in the file, but there are lots of other changes of higher 
priority to our compiler/linker team.

2) In a multi-segment application, each additional segment starts with a 
structure that points us to its data relocations in the compressed data 
resource.  There is no way to disable this when building a multi-segment 
app.  If you want to see the definition of this header, see "struct 
SegmentHeader" in PalmOS_Startup.cpp in the CW runtime code.

-- 
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead

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

Reply via email to