From 151374fcfe828535d15c58a96d06d0dfae908d35 Mon Sep 17 00:00:00 2001 From: Fish Date: Wed, 20 Sep 2023 19:51:50 -0700 Subject: [PATCH] Get CC in a plaform-aware manner. (#61) --- angrop/chain_builder/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/angrop/chain_builder/__init__.py b/angrop/chain_builder/__init__.py index bc7efbe..a01336b 100644 --- a/angrop/chain_builder/__init__.py +++ b/angrop/chain_builder/__init__.py @@ -592,7 +592,10 @@ def func_call(self, address, args, **kwargs): else: raise RopException("Symbol passed to func_call does not exist in the binary") - cc = angr.DEFAULT_CC[self.project.arch.name](self.project.arch) + cc = angr.default_cc( + self.project.arch.name, + platform=self.project.simos.name if self.project.simos is not None else None, + )(self.project.arch) func_gadget = RopGadget(address) func_gadget.stack_change = self.project.arch.bytes return self._func_call(func_gadget, cc, args, **kwargs)