[ELF] Fix linking when a regular object defines a symbol that is used in a DSO

Patch from Rafael Auler!

When a shared lib has an undefined symbol that is defined in a regular object
(the program), the final executable must export this symbol in the dynamic
symbol table. However, in the current logic, lld only puts the symbol in the
dynamic symbol table if the symbol is weak. This patch fixes lld to put the
symbol in the dynamic symbol table regardless if it is weak or not.

This caused a problem in FreeBSD10, whose programs link against a crt1.o
that defines the symbol __progname, which is, in turn, undefined in libc.so.7
and will only be resolved in runtime.

http://reviews.llvm.org/D5424

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@218259 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "[ELF] Fix linking when a regular object defines a symbol that is used in a DSO"

This commit reverts r218259 because it needed to be checked in with
a few binary files for the test.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@218262 91177308-0d34-0410-b5e6-96231b3b80d8