[interception] Check for export table's size before referring to its elements.

This fix a bug, when calling InternalGetProcAddress() for an executable that
doesn't export any symbol. So the table is empty.
If we don't check for this condition, the program fails with Error 0xc0000142.

Also, I add a regression test for Windows.

Differential Revision: https://reviews.llvm.org/D28502

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@293521 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed