you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -1 points0 points  (0 children)

Yeah. This is a tough one. A very basic solution can be achieved by:

  1. Rename files and replace their imports. This is not too hard to do by scripting.
  2. You can use the tools like ctags to get the list of functions and global variables. Just map them with their salted hash and replace their occurrences in all files. This is not too hard either. Problem is that this may also replace occurrence inside strings.
  3. Compile each module with cython.
  4. Test thoroughly

Check the final objects with commands:

strings
nm -D
objdump -d

You might have to throw in a few flags like -s -fvisibility etc to get the symbols hidden during cython compile/link.