0002422: Can't use e-acsl on a dynamic library containing all the instrumentations

Description

Hi !
main.c contains the entry point : the main function and is not instrumented by frama-c
it calls instrumented func.c (e-acsl.func.c containing the __e_acsl_memory_init call) compiled as a dynamic library libe-acsl.func.so
then the e-acsl code segfault at
e_acsl_segment_tracking.h:815

Why the hell am I doing this ? :)
Contiki-NG is an IoT OS. It can be build as a firmware for several IoT devices, as a ELF for Linux x86/x86_64, and as a shared library loaded by the Java Cooja network simulator (with some JNI).
Before experimenting with dlopen in C and JNI in Java, which is going to fail because of the __executable_start symbol at ./share/frama-c/e-acsl/segment_model/e_acsl_shadow_layout.h:47
(this will the subject of another future post)
I would like to be able, as a first step, to use a e-acsl instrumented dynamic library used by a non-instrumented program (containing main or not).
I am open to a solution that eventually needs some change inside the C E-ACSL code.

See Section 3.3.1 ("Programs without Main") of the E-ACSL user manual. Actually this section could be improved: that is why I do not close this issue.
To sum up, you must call __e_acsl_memory_init at the beginning of the main and __e_acsl_memory_clean at the end.
Typically (for a 64-bit architecture):
====
int main() {
__e_acsl_memory_init((int *)0,(char ***)0,(size_t)8);
[...]
__e_acsl_memory_clean();
return 0;
}
=====