Fix pecoff/export.test on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@210621 91177308-0d34-0410-b5e6-96231b3b80d8
[mach-o] fix use of resolver functions to not cause duplicate sections.

The previous commit uncovered a bug in the mach-o writer whereby two __text
sections were created.  But the test case did not catch that.  So I updated
the test case to run the linker a second time, reading the output of the
first pass.  



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