I am experimenting with the --simple option of mkbundle (which attaches everything to the end of the main mono executable, introduced recently). One of my dll.config has this:
<?xml version="1.0" encoding="utf-8" ?>
<dllentry os="linux" dll="libfreetype.so.6" />
<dllentry os="osx" dll="libfreetype.6.dylib" />
<dllentry os="freebsd" target="libfreetype.so.6" />
When I ran MONO_LOG_MASK=dll MONO_LOG_LEVEL=debug, I found that mono never looks for the so.6 entry, i.e. the dllmap is simply ignored.
This is first seen on Mac OS X but I replicated the problem on linux too.
I can work around this problem by doing "--library freetype6,..." directly on the mkbundle invocation, but it seems quite confusing when the mkbundle --simple option is embedding the config but ignoring it (instead of simply not embedding).
This is mono 4.8.0 - I see there are some further changes after, so apologies if this is fixed in later releases.
Although this mostly concerns new functionality in mkbundle and how it should work in the runtime, the relevant code for registering and and lookup native library is part of the run time and is in mono/mini/main.c ( https://github.com/mono/mono/commit/2f1e6655e2c9a9dd28c0a8b14f26d3d6b1c720bd )
Alexander, this seems related to mkbundle, could you please take a look? Thank you.