Create a shared library without any unresolved symbol You can pass options to the linker like this: -Wl,options. So what we can do here is -Wl,-z,defs.