>> Can such an alternative entry point in the main unit be called by
>> a shared library, i.e. either resolved at load time or with the main
>> binary reopened like a library? Or is the only way to pass a main-
>> program entry point to a shared library by using it as a parameter
>> to a procedure?

> I can't tell you for *nix systems as I'm not experienced enough
> regarding their dynamic linkers,

Superficial testing suggests that if the code in a .so (Linux, i386) tries to call an "extra" entry point exported from the main program, that a run-time (libdl) load of the library will fail. I'll keep on tinkering with this, I've not yet retrieved the exact error message and I'm interested in seeing what happens if the .so itself tries to use libdl to reopen the main program.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to