Commit 6a12d93b authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Handle already relocated .dynamic entries.

parent adb52247
......@@ -1340,12 +1340,14 @@ static void call_constructors( WINE_MODREF *wm )
if (dlinfo( wm->so_handle, RTLD_DI_LINKMAP, &map ) == -1) return;
for (dyn = map->l_ld; dyn->d_tag; dyn++)
{
#define GET_PTR(base,ptr) ((ptr) > (base) ? (ptr) : (base) + (ptr))
switch (dyn->d_tag)
{
case 0x60009990: init_array = (void *)((char *)map->l_addr + dyn->d_un.d_val); break;
case 0x60009990: init_array = (void *)GET_PTR( map->l_addr, dyn->d_un.d_ptr ); break;
case 0x60009991: init_arraysz = dyn->d_un.d_val; break;
case 0x60009992: init_func = (void *)((char *)map->l_addr + dyn->d_un.d_val); break;
case 0x60009992: init_func = (void *)GET_PTR( map->l_addr, dyn->d_un.d_ptr ); break;
}
#undef GET_PTR
}
TRACE( "%s: got init_func %p init_array %p %lu\n", debugstr_us( &wm->ldr.BaseDllName ),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment