rtl_print works for fds.
moved thunks into a separate library to ease linking.
uninitialized vars in print.