While the library itself will not use the interpreter program (ld-linux.so) directly, we can run ld-linux.so with the program as an argument in order to get the same effect. This is because libriscv can now load dynamic/shared executables that does not depend on an interpreter (eg. for glibc). Additionally, this allows the host programmer to fully control all aspects of dynamic ELF loading through open-filter as well as the interpreter.
For now, the example emulator implementation in emulator/src/main.cpp assumes a certain loader.
So, simple rules for dynamic executables:
Static PIE can always be run
Dynamic ELF with interpreter dependency will need to be loaded by the interpreter
While the library itself will not use the interpreter program (ld-linux.so) directly, we can run ld-linux.so with the program as an argument in order to get the same effect. This is because libriscv can now load dynamic/shared executables that does not depend on an interpreter (eg. for glibc). Additionally, this allows the host programmer to fully control all aspects of dynamic ELF loading through open-filter as well as the interpreter.
For now, the example emulator implementation in emulator/src/main.cpp assumes a certain loader.
So, simple rules for dynamic executables: