A Framework for Automated Architecture-Independent Gadget Search