[Mono-dev] DllImport("__Internal") and libMonoPosixHelper static build
Robert Jordan
robertj at gmx.net
Fri Jan 3 17:40:04 UTC 2014
On 31.12.2013 10:34, mobin.seven wrote:
> Same here! Did you solve it?
>
> ralphbariz wrote
>> Hi,
>>
>> I'm trying to compile a static one binary mono(Because the target system
>> has an incompatible loader).
>> First I got mono to build statically, but without libMonoPosixHelper in
>> the archive. After a few tries, I got also this, changed all
>> DllImport(MPH) calls in Mono.Posix.dll to DllImport("__Internal"), it
>> still gives me a TypeInitializationexception when I try to access the stat
>> symbol of the libMonoPosixHelper. With objdump I looked inside, the
>> symbols of libMonoPosixHelper are all inside the archive, so what am I
>> doing wrong?
Your custom loader is supposed to support dlopen(NULL) and
your linker must be able to export public symbols.
See ld's --export-dynamic option.
Robert
More information about the Mono-devel-list
mailing list