[Lazarus] "Running" a library

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Sat Sep 15 15:57:23 CEST 2012


Mark Morgan Lloyd wrote:

>> I have now checked ReactOS' code: if you load an exe that is not the 
>> main executable then the entry point won't be called at all. So it 
>> seems that you can load such executables and call functions from them, 
>> but in the case of FPC you might be screwed (or at least very 
>> restricted) as the initialization sections of the units won't be run 
>> (this includes the system unit which initializes the heap, io, etc.).
> 
> Thanks for that, I'm currently looking at the situation on x86 Linux 
> since I think it's worth progressing this while the thread's fresh.

I don't think this is doing to work on Linux. I know that a shared 
library can open the main program by referring to '' (and am using 
this), but trying to pass the name of a different program fails with "No 
such file or directory" and no useful error message from dl.

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

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list