correct linker options for newer gcc
refactor hashes and kernel monkey patch