To test dynamic loading, there are two features need to be tested, one is preloading library, and another one is library loaded by dlopen functions. Preloading library can be implicitly tested by running the normal unit testsuite with glibc dynamically loaded, but to test dlopen, some dedicated pipeline might be needed in CI to make it work.
A ideal dlopen test would consist of a main module (e.g. main.c) and some libraries (e.g. lib.c), I already made lind_compile being able to compile both target: lind_compile main.c for building main module and lind_compile --compile-library lib.c for building library module (note that lind_compile is doing dynamic build by default right now). Therefore, to run a dlopen related test, the library needs to be first compiled with --compile-library flag, after then we can run the test correctly
To test dynamic loading, there are two features need to be tested, one is preloading library, and another one is library loaded by
dlopenfunctions. Preloading library can be implicitly tested by running the normal unit testsuite with glibc dynamically loaded, but to testdlopen, some dedicated pipeline might be needed in CI to make it work.A ideal
dlopentest would consist of a main module (e.g. main.c) and some libraries (e.g. lib.c), I already madelind_compilebeing able to compile both target:lind_compile main.cfor building main module andlind_compile --compile-library lib.cfor building library module (note thatlind_compileis doing dynamic build by default right now). Therefore, to run a dlopen related test, the library needs to be first compiled with--compile-libraryflag, after then we can run the test correctly