implement ad-hoc libpatch_patch for Thumb