all you have to do to remove the function code is to shift from N byte all that is "behind", N being the said function's length. In the process, just use the relocation information to patch the moved code and make sure it is still valid. Or even simpler, patch the relocation information itself (just subtract N to every affected entry in the relaction table).
Never thought it this way... :D