>>> "Jim" == Jim Schram <[EMAIL PROTECTED]> writes:

[...]

 Jim> The library name *must* be at the *end* of the dispatch
 Jim> table. It's a shared library requirement.

[...]

Ok, thanks for the statement.  Now, as I said, it does really
matter to me where I put the library name, but I'm curious
(sorry, I'll hate me): why is this *required*?  One reason I can
think of is that it allows to compute the size of the dispatch
table (and then copy or bound checking?).

Also I'd like to know what you call the *end* of the dispatch
table; unlike the sample I have sent (where the offset point
directly to the function), most of the syslib dispatch table
I've seen on the net looks like this:

          .even
  jumptable:
          dc.w name - jumptable
          dc.w indir1
          dc.w indir2
          dc.w indir3
          ...
  indir1: jmp FooOpen
  indir2: jmp FooClose
          ...
  name:   .asciiz "foobarlib"


But IIRC those extra jumps are just workarounds to something in
CW; they don't really belong to the jumptable.  So name
would better be placed before them

          .even
  jumptable:
          dc.w name - jumptable
          dc.w indir1
          dc.w indir2
          dc.w indir3
          ...
  name:   .asciiz "foobarlib"
  indir1: jmp FooOpen
  indir2: jmp FooClose
          ...


-- 
Alexandre Duret-Lutz


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

Reply via email to