crazy linker: Fix incorrect link map l_addr value.

Link map's l_addr field should contain the load bias:
- https://android-review.googlesource.com/#/c/46470/2/linker/linker.cpp

It currently contains the load address.  Where the min vaddr of LOAD
segments is zero, the load address and load bias are the same, and the
problem remains hidden.  Android's relocation packer generates a
non-zero min vaddr, and this exposes the problem on arm64 platforms.

The symptom is abort in uw_init_context_1, where uw_frame_state_for
returns _URC_END_OF_STACK rather than (expected) _URC_NO_REASON.
gcc's stack unwinding code does not find correct unwinding information
after an incorrect l_addr has been used to convert from virtual to
physical addresses.  Arm32 does not show the problem because it uses
dl_unwind_find_exidx in place of _Unwind_IteratePhdrCallback.

See also line 196 of:
- https://android.googlesource.com/platform/bionic/+/
      lollipop-mr1-release/linker/linker.cpp

BUG=385553

Review URL: https://codereview.chromium.org/1155973005

Cr-Commit-Position: refs/heads/master@{#333040}
2 files changed