Project:Quality Assurance/-Wl,-z,defs and -Wl,--no-allow-shlib-undefined

-Wl,-z,defs (aka -Wl,--no-undefined) and -Wl,--no-allow-shlib-undefined are two linker options that could be used to prevent undefined references in libraries.

Default state
By default, the GNU linker disallows undefined symbol references when linking final executables but allows them for shared libraries. The latter behavior is necessary since many projects depend on missing shared library symbols being provided by executables they are linked or loaded to. This is commonly the case with plugins, which call the plugin API provided by the executable that loads them.

However, this behavior also means that if a shared library misses linking to a dependency, it will build fine and the error won't be visible until the first executable linking to the library (directly or indirectly) is built. For example, if has missing symbols, and  links to it, neither of those two packages will fail to build. However, a package using ffmpeg, e.g. will fail to build due to undefined symbols in flite.