[UNIX]Re: VM generation problem (Linux)

Tim Rowledge tim at sumeru.stanford.edu
Mon Sep 18 23:26:28 UTC 2000


"Raab, Andreas" <Andreas.Raab at disney.com> is widely believed to have written:


> > Using 'dlsym' or whatever to look them up is a crime. Don't do it. Ever.
> 
> That was it ;-) Having some export table in the plugin would actually serve
> two purposes: For one thing, it would prevent implicit erronous lookups by
> the underlying OS (DON'T YOU LAUGH! that's exactly what happened some time
> ago when somebody defined a method named #isBytes: in a *n*x plugin). And it
> would make sure that the lookups we see are the 'primitive lookups', e.g.,
> not some randomly exported symbol such "DLLinit at 154", or "__init_dso" or
> "exit" or whatever.
Hmm, yes, good idea. We would rely still on the use of dlsym/whatever to
find the most basic init function in the plugin, but thereafter only
work through our own lookup/dictionary/table/etc. Should work nicely. If
we name that basic function something really obnoxious like
SqueakBasicPluginLookupFunctionDontYouDareMessWithThis there isa
reasonable chance the compiler won't have it as a reserved work (hey
- these things happen. When  wa at PPS we had a nightmare case where a
new release of VC++ wouldn't build the VW vm. It turned out that the
compiler considered 'superForSend' a sacred word and we had to change to
use 'sFs' instead! damned M$)

tim

-- 
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Useful random insult:- Four cents short of a nickel.





More information about the Squeak-dev mailing list