patch both binary and library
