SGC: Towards Automating Code-Reuse Attacks Using Synthesized Gadget Chains