On 12/03/14 21:00, Justin Cormack wrote:
> I was experimenting with cross building with buildrump.sh and then
> running the tests with qemu, to make arm builds faster. The builds are
> fine, but its a pain to get qemu to run dynamic binaries without
> making substantial changes to scripts. So I thought I would just build
> the tests statically linked, as then they would just run under qemu
> directly.
>
> Unfortunately you can't build statically linked apps, as rumpuser
> requires the dl* stuff. Even on openbsd, which has no dlopen support
> it still links against dlsym, so you can't even statically link as
> that not in static libc.
>
> Any willingness to support static linking in standard rumpuser (as
> opposed to an alternative one)? And thoughts about how to?

No opposition.  I think nobody has just noticed -static support missing. 
  (well, ok, I did notice it yesterday, but apart from that ;)

Maybe the easiest way is to make the snippet at the top of rumpuser_dl.c 
say "#if defined(__PIC__) && defined(__ELF__) && (...)".

You still need to call domodinit() and docompload(), but since we're now 
talking about a statically linked binary, you can just force references 
to the symbols, e.g. domodload(&__start_link_set_modules, ...)

Hmm, actually that will go wrong if you link a static librumpuser into a 
dynamically linked binary.  Hmmhmm.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
rumpkernel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rumpkernel-users

Reply via email to