On Friday 10 June 2005 10:43, Derick Swanepoel wrote:
On 6/9/05, Frank Mehnert fm3@os.inf.tu-dresden.de wrote:
If you need the libraries of the l4env_freebsd_mode, it should be possible to add these libraries using the LIBS= parameter. If you look at the appropriate Makefile you will see, that libloaderif.a contains only the client stub of the loader IDL and therefore has nothing to do with the shared library stuff.
The point is that you should start from the loader mode and enhance this mode for your needs since the loader mode uses a different startup strategy than the sigma0 mode.
Thanks for the advice. I have created a new mode to combine the loader mode with what I need from l4env_freebsd, and I can successfully compile and link my application. Unfortunately it causes a double pagefault when loaded...:
loader | "(nd)/fiasco/ds/test" is a valid binary image loader | Setting libpath to (nd)/fiasco/ds/ exec | test: Loading exec | test: Saved 457726 bytes of symbols exec | libloader.s.so: Relocating to 0000e000 exec | libloader.s.so: Linking exec | libloader.s.so: Relocating entry 000058d0 => 000138d0 exec | libloader.s.so: Setting section flag 0800 exec | test: Setting section flag 0800 loader | test: Starting l4env-style application loader | test,#11: Starting at l4loader_init (00014080) loader | test,#11: Double PF (r) at 00000000 eip 00000000 (11.00)
Ok, this is a pagefault in the loader library. Please look at the file l4/pkg/loader/server/src/app.c and search for APP_ADDR_LIBLOADER. Take that address as the base for libloader.s.so. Subtract that address from the pagefault address. The result is the offset into the loader lib. Do
objdump -ld libloader.s.so | less
and search for the offset. Then scroll a little bit around and look for lines of source code contained in the listing. Or simply post the listing here.
Frank