On Thu, Jan 22, 2015 at 3:41 PM, Antti Kantee <[email protected]> wrote:
>> I have faked dynamic linking in a static binary before (with LuaJIT)
>> by replacing dlopen et al with static code that returns links to stuff
>> thats already in the static binary. I was discussing doing that with
>> Ruby the other day. It is slightly messy as you need a full symbol
>> list, so some code to generate that from the binary would probably
>> make sense. A general version would work for many languages like
>> that...
>
> Ah, right, I guess you could fake it that way.
>
> Can't you just generate the list of symbols offline (nm) and feed it to
> the guest with whatever other data you feed it?  That should work with
> anything that is statically linked and for dynamically linked
> environments I think the problem is moot (just use host dl*, at least
> FSVO "just").

You have to make sure the symbols are linked in, so you would need to
extract the symbols from individual archives then generate the fake
dl. It should be doable generically. Plus you need to sort out not
having dlopen in the binary - glibc has a tendency to allow static
binaries to do dlopen, Musl is sane.

Host dl seems problematic as it will only work on dynamically linked
posix as a platform.

Justin

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
rumpkernel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rumpkernel-users

Reply via email to