[ELF] - Linkerscript: add test for checking interaction with archive files.
[ELF] - Linkerscript: add test for checking interaction with archive files.

Imagine we have archive file with symbols foo and bar.
And script that do foo = 1.
In that case correct behavior is not to fetch symbols from archive but
create absolute symbol. 
If we have script zed = foo then symbol foo will be fetched from archive.
Currently we have Opt.ReferencedSymbols list of symbols referenced
by script and create them undefined early. That allows archives fetching logic 
to work. That is what LLD already do and it seems everything is fine here.

But during writing D37059 I had to add left side of assignments to
Opt.ReferencedSymbols list because wanted to stop optimizing out
these symbols when LTO is involved (LTO also uses this list). 
And testcase from this patch would have fail if we would have it before.

Differential revision: https://reviews.llvm.org/D37208

git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@312004 91177308-0d34-0410-b5e6-96231b3b80d8

llvm-mirror/lld,llvm-mirror/lld