winebuild: Improved checks for missing forward entry point targets.
This commit is contained in:
parent
32fc1acb1c
commit
e6fe7341f5
|
@ -424,39 +424,39 @@ static int check_unused( const struct import* imp, const DLLSPEC *spec )
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check if a given forward does exist in one of the imported dlls */
|
/* check if a given forward does exist in one of the imported dlls */
|
||||||
static void check_undefined_forward( DLLSPEC *spec, ORDDEF *odp )
|
static void check_undefined_forwards( DLLSPEC *spec )
|
||||||
{
|
{
|
||||||
char *link_name, *api_name, *dll_name, *p;
|
char *link_name, *api_name, *dll_name, *p;
|
||||||
int i, found = 0;
|
int i, j;
|
||||||
|
|
||||||
assert( odp->flags & FLAG_FORWARD );
|
for (i = 0; i < spec->nb_entry_points; i++)
|
||||||
|
|
||||||
link_name = xstrdup( odp->link_name );
|
|
||||||
p = strrchr( link_name, '.' );
|
|
||||||
*p = 0;
|
|
||||||
api_name = p + 1;
|
|
||||||
dll_name = get_dll_name( link_name, NULL );
|
|
||||||
|
|
||||||
for (i = 0; i < nb_imports; i++)
|
|
||||||
{
|
{
|
||||||
struct import *imp = dll_imports[i];
|
ORDDEF *odp = &spec->entry_points[i];
|
||||||
|
|
||||||
if (!strcasecmp( imp->spec->file_name, dll_name ))
|
if (!(odp->flags & FLAG_FORWARD)) continue;
|
||||||
|
|
||||||
|
link_name = xstrdup( odp->link_name );
|
||||||
|
p = strrchr( link_name, '.' );
|
||||||
|
*p = 0;
|
||||||
|
api_name = p + 1;
|
||||||
|
dll_name = get_dll_name( link_name, NULL );
|
||||||
|
|
||||||
|
for (j = 0; j < nb_imports; j++)
|
||||||
{
|
{
|
||||||
if (find_export( api_name, imp->exports, imp->nb_exports ))
|
struct import *imp = dll_imports[j];
|
||||||
{
|
|
||||||
found = 1;
|
if (strcasecmp( imp->spec->file_name, dll_name )) continue;
|
||||||
break;
|
if (!find_export( api_name, imp->exports, imp->nb_exports ))
|
||||||
}
|
warning( "%s:%d: forward '%s' not found in %s\n",
|
||||||
|
spec->src_name, odp->lineno, odp->link_name, imp->spec->file_name );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
if (j == nb_imports)
|
||||||
|
warning( "%s:%d: forward '%s' not found in the imported dll list\n",
|
||||||
|
spec->src_name, odp->lineno, odp->link_name );
|
||||||
|
free( link_name );
|
||||||
|
free( dll_name );
|
||||||
}
|
}
|
||||||
|
|
||||||
free( link_name );
|
|
||||||
free( dll_name );
|
|
||||||
|
|
||||||
if (!found)
|
|
||||||
warning( "%s:%d: forward '%s' not found in the imported dll list\n",
|
|
||||||
spec->src_name, odp->lineno, odp->link_name );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* flag the dll exports that link to an undefined symbol */
|
/* flag the dll exports that link to an undefined symbol */
|
||||||
|
@ -468,11 +468,7 @@ static void check_undefined_exports( DLLSPEC *spec )
|
||||||
{
|
{
|
||||||
ORDDEF *odp = &spec->entry_points[i];
|
ORDDEF *odp = &spec->entry_points[i];
|
||||||
if (odp->type == TYPE_STUB) continue;
|
if (odp->type == TYPE_STUB) continue;
|
||||||
if (odp->flags & FLAG_FORWARD)
|
if (odp->flags & FLAG_FORWARD) continue;
|
||||||
{
|
|
||||||
check_undefined_forward( spec, odp );
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (find_name( odp->link_name, &undef_symbols ))
|
if (find_name( odp->link_name, &undef_symbols ))
|
||||||
{
|
{
|
||||||
switch(odp->type)
|
switch(odp->type)
|
||||||
|
@ -597,6 +593,7 @@ int resolve_imports( DLLSPEC *spec )
|
||||||
ORDDEF *odp;
|
ORDDEF *odp;
|
||||||
|
|
||||||
sort_names( &ignore_symbols );
|
sort_names( &ignore_symbols );
|
||||||
|
check_undefined_forwards( spec );
|
||||||
|
|
||||||
for (i = 0; i < nb_imports; i++)
|
for (i = 0; i < nb_imports; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue