Building programs with MODE=shared in L4Re

Paul Boddie paul at
Fri May 11 01:00:11 CEST 2018


I have been busy writing libraries and programs for L4Re and recently had to 
think about the size of the payloads I have been deploying. It appears that in 
the build system, one can use MODE=shared to build dynamically-linked 
programs, and there is a shared version of the hello example in the examples 

However, I don't see any recipe for doing this for other programs. My 
impression is that the dynamic linker must have all the required libraries 
deployed as modules, and so I wrote a script to generate a list of such 
modules using readelf. In addition, it appears that is 
required (which readelf does not detect).

Adding these modules to my conf/modules.list should yield success, but within 
my constrained debugging environment, I only see that "shared" programs fail 
to start. I really need to see if they start but then experience some 
initialisation problem, or whether they actually crash but Mag keeps their 
viewports around.

Are there any other things that I need to consider when building and deploying 
such programs? I searched for guidance on this topic and only found the 

Both of these discussion threads only provide some details and are obviously 
not tutorials.

Thanks for any clues you might be able to provide!


P.S. I guess I could also see if the CI20 produces useful console-level 
details, perhaps indicating an architecture-related problem. Usually, however, 
the problem is caused by some simple mistake I have made, so I suspect that 
there is merely some detail I have forgotten.

More information about the l4-hackers mailing list