Rewritten to be a standalone DSO and avoid libc.