Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can anyone provided an explanation of how the binary patch is applied?


If you're familiar with Go you can read the source of the apply function here:

the loadKernel function reads in the kernel and builds a symbol table looking for the bsd_ast and current_thread symbols here:

https://code.google.com/p/rsc/source/browse/cmd/pprof_mac_fi...

then the "apply" func writes the modified binary instructions code:

https://code.google.com/p/rsc/source/browse/cmd/pprof_mac_fi...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: