Is there a way to make linking fail if the code references a certain symbol from a library?
I seem to remember dimly that there was such a directive in the linker script language, but apparently it was not GNU LD (maybe it's a false memory).
I need it to prevent some part of a third-party library from accidentally linking into the application. If it does link, it adds some static initializers which wreak havoc at runtime (it's an embedded project so the environment is a bit quirky). I cannot change the third-party library in question. I would like to detect the error at build time. I guess I can write a post-build script that parses the map file and issues an error if it finds the offending parts, but the mentioned above [false?] memory prompts me to ascertain it can't be done using the linker alone.
I'm using the GNU GCC toolchain.