Fix logic of get_binary_load_address
The value of the of the pointer to program header returned by
gelf_getphdr is always the same, assuming the value of the last
parameter to gelf_getphdr stays the same. What changes is what is
pointed to by that pointer. So rather than storing the the program
header (to determine the lowest load address among several program
headers returned by gelf_getphdr) we need to store the load address
pointed to by the pointer to the program header.
Thanks to Matthias Männich for spotting this and discussing it at
https://sourceware.org/ml/libabigail/2019-q2/msg00064.html.
Testing this is a bit annoying as we'd need to consider a prelinked binary which has
split debuginfo. I should probably add such a binary to the regression
test suite at some point.
* src/abg-dwarf-reader.cc (get_binary_load_address): Consider the
load address pointed to by the program header pointer returned by
gelf_getphdr rather than the program header itself.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>