-
Notifications
You must be signed in to change notification settings - Fork 37
Description
A feature that would be highly useful for me in particular is the ability to disable modules - either by not including them in the output, or by having their functions just return ENOSYS.
My use case: I use musl as the libc for the toolchain for my MIPS emulator: https://github.com/ameisen/vemips
However, the emulated OS that is provided by default does not implement... 95% of the functionality that musl expects. Some obvious ones are almost all of thread and lock-related functionality.
This has become more problematic in more recent versions of musl that appear to implement locking more thoroughly - I've had to disable these locks manually in musl's source. It's be easier if swaths of features like this could be just disabled instead - say, MUSL_NO_THREADS, MUSL_NO_LOCKS/FUTEXES, MUSL_NO_FILES (except stdin/stdout/stderr), etc.
I've run into straight hangs because musl was trying to use futexes, and regardless of what the emulated kernel was returning (0, 1, ENOSYS, etc) it was never able to get past the locks, as the emulator has no ability to pause a thread and resume execution elsewhere (this wouldn't be a terrible feature to support, but that all takes time).
Alternatively, I could implement this all more thoroughly and make a pull request.