do not link in C libraries in side modules
refactor invoke generation and add missing invokes when linking