We were only doing it for .so and --export-dynamic, but those are not the only ways a symbol ends up in the dynamic symbol table. Problem diagnostic and earlier patch version by Peter Collingbourne. llvm-svn: 267568