Fill l_ld of linkmaps with value from soinfo::dynamic.

GDB will try to read l_ld of linkmaps and compare the value to vma of
.dynamic sections from shared objects.  Since linker does not assign l_ld,
GDB will complain about and re-compute l_addr from l_ld.  And, GDB will get a
wrong value.
This commit is contained in:
Thinker K.F Li 2009-07-03 19:40:32 +08:00 committed by Jean-Baptiste Queru
parent 76ec6891e2
commit 5cf640c926

View File

@ -152,6 +152,7 @@ static void insert_soinfo_into_debug_map(soinfo * info)
map = &(info->linkmap);
map->l_addr = info->base;
map->l_name = (char*) info->name;
map->l_ld = (uintptr_t)info->dynamic;
/* Stick the new library at the end of the list.
* gdb tends to care more about libc than it does