[profile] Compute number of data entries correctly

Compiler-rt miscalculates the number of entries in the __llvm_prf_data section
on i386 Darwin. This results in a number of test failures (which we started
catching after r261344).

The fix we attempted earlier is insufficient (r261683). It caused some tests to
start passing again, but that hid the fact that we drop some data entries.

This patch should fix the real problem. It fixes the way we compute DataSize by
taking into account the way the Darwin linker lays out __llvm_prf_data.

Differential Revision: http://reviews.llvm.org/D17623

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@261957 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 637ea58edc2dceb16b7b5f1fd4c90de408ee9833)
4 files changed