Re:Function hooking in Swift
by ololoev on Thursday June 19, 2014 @12:34AM
(#7914494)
It's all about reverse-engineering stuff; my usual workflow looks like:
(1) Complile some Swift program & look at the disasembler listing of it (I use IDA and — for Objective-C — Hopper Disassembler);
(2) Do some changes in source code in the program, compile it again, and see diffs in disassembler listing;
that way I can see what is changed and how.
About the @asmname thing: you can easily dump every default Swift module using a REPL command:
repl> :print_module Swift
There you can find a lot of interesting language lexems and more, so all you have to do is to try using them in your code until you don't figure it out ;)
About the @asmname thing: you can easily dump every default Swift module using a REPL command:
repl> :print_module Swift
There you can find a lot of interesting language lexems and more, so all you have to do is to try using them in your code until you don't figure it out ;)