Commit 152b98fa authored by Alexandre Julliard's avatar Alexandre Julliard

Added -private flag for entry points that shouldn't be imported from

other dlls. Support PRIVATE flag in .def files (based on a patch by Jon Griffiths).
parent b96b3d15
......@@ -102,6 +102,8 @@ typedef struct
#define FLAG_I386 0x08 /* function is i386 only */
#define FLAG_REGISTER 0x10 /* use register calling convention */
#define FLAG_INTERRUPT 0x20 /* function is an interrupt handler */
#define FLAG_PRIVATE 0x40 /* function is private (cannot be imported) */
#define FLAG_FORWARD 0x100 /* function is a forwarded name */
/* Offset of a structure field relative to the start of the struct */
......
......@@ -341,6 +341,11 @@ static int read_import_lib( const char *name, struct import *imp )
/* we don't support importing non-function entry points */
goto next;
}
else if (!strcmp( flags, "PRIVATE" ))
{
/* function must not be imported */
goto next;
}
else
{
error( "Garbage after ordinal declaration\n" );
......
......@@ -62,6 +62,7 @@ static const char * const FlagNames[] =
"i386", /* FLAG_I386 */
"register", /* FLAG_REGISTER */
"interrupt", /* FLAG_INTERRUPT */
"private", /* FLAG_PRIVATE */
NULL
};
......
......@@ -853,8 +853,11 @@ void BuildDef32File(FILE *outfile)
default:
assert(0);
}
fprintf(outfile, " @%d%s%s\n", odp->ordinal,
odp->name ? "" : " NONAME", is_data ? " DATA" : "" );
fprintf( outfile, " @%d", odp->ordinal );
if (!odp->name) fprintf( outfile, " NONAME" );
if (is_data) fprintf( outfile, " DATA" );
if (odp->flags & FLAG_PRIVATE) fprintf( outfile, " PRIVATE" );
fprintf( outfile, "\n" );
}
}
......
......@@ -243,6 +243,10 @@ The function uses CPU register to pass arguments.
.TP
.B -interrupt
The function is an interrupt handler routine.
.TP
.B -private
The function cannot be imported from other dlls, it can only be
accessed through GetProcAddress.
.SS "Function ordinals"
Syntax:
.br
......
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