Match it against the dl_iterate_phdr list. It should have the same entries,
but they could be in a different order.
Test that the dl_iterate_phdr callback always provides at least a PT_LOAD
segment.
Verify that the executable comes first in the _r_debug list.
Test: bionic-unit-tests
Bug: http://b/110967431
Change-Id: I9b6ec77d1205c4c45848adf65456bb7b3da4a3a1
The dl_iterate_phdr test is new, but the exidx test is largely copy & paste
from ndk_translation.
Bug: http://b/31556066
Test: ran tests
Change-Id: If754f1459ef1d789ee98a89cd2215188edca51da