rehosting / libnvram

NVRAM emulator
MIT License
1 stars 2 forks source link

Dynamic library hooks #7

Closed AndrewFasano closed 1 week ago

AndrewFasano commented 1 month ago

A configuration file should be able to specify library names to be hooked and map them to simple behavior models.

I think we'd need to JIT compile our our libnvram (or do something crazy with hypercalls) before a rehosting runs. We'd still have some hand-crafted library shims, but then we'd be able to map arbitrary function names to these.

This model gets us away from having the long list of aliased functions in alias.c and let us configure it per target instead.

AndrewFasano commented 1 month ago

It would also be nice to detect when guest library functions are called (i.e., identify library name and function name, perhaps just identifying functions that were called at least once), though that might be more difficult.

AndrewFasano commented 2 weeks ago
AndrewFasano commented 1 week ago

https://github.com/rehosting/penguin/pull/129