Dead code elimination is only straightforward if your language has sane naming semantics (lexical scope, static name resolution, etc). If your language does crazy stuff like allowing function lookup by the string representation of its name in the source code (e.g. JavaScript) it becomes much harder.
Very few things are guaranteed in C. If you want to guarantee the function exists let the operating system look up the function names by string for you.