Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
32433112
Commit
32433112
authored
Oct 26, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Add a -ordinal flag for entry points that must be imported by ordinal…
winebuild: Add a -ordinal flag for entry points that must be imported by ordinal but exported by name.
parent
8170acfc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
10 deletions
+27
-10
build.h
tools/winebuild/build.h
+4
-3
parser.c
tools/winebuild/parser.c
+16
-5
spec32.c
tools/winebuild/spec32.c
+1
-1
winebuild.man.in
tools/winebuild/winebuild.man.in
+6
-1
No files found.
tools/winebuild/build.h
View file @
32433112
...
@@ -124,15 +124,16 @@ extern enum target_platform target_platform;
...
@@ -124,15 +124,16 @@ extern enum target_platform target_platform;
/* entry point flags */
/* entry point flags */
#define FLAG_NORELAY 0x01
/* don't use relay debugging for this function */
#define FLAG_NORELAY 0x01
/* don't use relay debugging for this function */
#define FLAG_NONAME 0x02
/* don't
im
port function by name */
#define FLAG_NONAME 0x02
/* don't
ex
port function by name */
#define FLAG_RET16 0x04
/* function returns a 16-bit value */
#define FLAG_RET16 0x04
/* function returns a 16-bit value */
#define FLAG_RET64 0x08
/* function returns a 64-bit value */
#define FLAG_RET64 0x08
/* function returns a 64-bit value */
#define FLAG_I386 0x10
/* function is i386 only */
#define FLAG_I386 0x10
/* function is i386 only */
#define FLAG_REGISTER 0x20
/* use register calling convention */
#define FLAG_REGISTER 0x20
/* use register calling convention */
#define FLAG_PRIVATE 0x40
/* function is private (cannot be imported) */
#define FLAG_PRIVATE 0x40
/* function is private (cannot be imported) */
#define FLAG_ORDINAL 0x80
/* function should be imported by ordinal */
#define FLAG_FORWARD 0x
8
0
/* function is a forwarded name */
#define FLAG_FORWARD 0x
10
0
/* function is a forwarded name */
#define FLAG_EXT_LINK 0x
100
/* function links to an external symbol */
#define FLAG_EXT_LINK 0x
200
/* function links to an external symbol */
#define MAX_ORDINALS 65535
#define MAX_ORDINALS 65535
...
...
tools/winebuild/parser.c
View file @
32433112
...
@@ -70,6 +70,7 @@ static const char * const FlagNames[] =
...
@@ -70,6 +70,7 @@ static const char * const FlagNames[] =
"i386"
,
/* FLAG_I386 */
"i386"
,
/* FLAG_I386 */
"register"
,
/* FLAG_REGISTER */
"register"
,
/* FLAG_REGISTER */
"private"
,
/* FLAG_PRIVATE */
"private"
,
/* FLAG_PRIVATE */
"ordinal"
,
/* FLAG_ORDINAL */
NULL
NULL
};
};
...
@@ -545,11 +546,14 @@ static int parse_spec_ordinal( int ordinal, DLLSPEC *spec )
...
@@ -545,11 +546,14 @@ static int parse_spec_ordinal( int ordinal, DLLSPEC *spec )
}
}
}
}
if
(
!
strcmp
(
odp
->
name
,
"@"
)
||
odp
->
flags
&
FLAG_NONAME
)
if
(
!
strcmp
(
odp
->
name
,
"@"
)
||
odp
->
flags
&
(
FLAG_NONAME
|
FLAG_ORDINAL
)
)
{
{
if
(
ordinal
==
-
1
)
if
(
ordinal
==
-
1
)
{
{
error
(
"Nameless function needs an explicit ordinal number
\n
"
);
if
(
!
strcmp
(
odp
->
name
,
"@"
))
error
(
"Nameless function needs an explicit ordinal number
\n
"
);
else
error
(
"Function imported by ordinal needs an explicit ordinal number
\n
"
);
goto
error
;
goto
error
;
}
}
if
(
spec
->
type
!=
SPEC_WIN32
)
if
(
spec
->
type
!=
SPEC_WIN32
)
...
@@ -557,9 +561,16 @@ static int parse_spec_ordinal( int ordinal, DLLSPEC *spec )
...
@@ -557,9 +561,16 @@ static int parse_spec_ordinal( int ordinal, DLLSPEC *spec )
error
(
"Nameless functions not supported for Win16
\n
"
);
error
(
"Nameless functions not supported for Win16
\n
"
);
goto
error
;
goto
error
;
}
}
if
(
!
strcmp
(
odp
->
name
,
"@"
))
free
(
odp
->
name
);
if
(
!
strcmp
(
odp
->
name
,
"@"
))
else
odp
->
export_name
=
odp
->
name
;
{
odp
->
name
=
NULL
;
free
(
odp
->
name
);
odp
->
name
=
NULL
;
}
else
if
(
!
(
odp
->
flags
&
FLAG_ORDINAL
))
/* -ordinal only affects the import library */
{
odp
->
export_name
=
odp
->
name
;
odp
->
name
=
NULL
;
}
}
}
return
1
;
return
1
;
...
...
tools/winebuild/spec32.c
View file @
32433112
...
@@ -552,7 +552,7 @@ void BuildDef32File( DLLSPEC *spec )
...
@@ -552,7 +552,7 @@ void BuildDef32File( DLLSPEC *spec )
assert
(
0
);
assert
(
0
);
}
}
output
(
" @%d"
,
odp
->
ordinal
);
output
(
" @%d"
,
odp
->
ordinal
);
if
(
!
odp
->
name
)
output
(
" NONAME"
);
if
(
!
odp
->
name
||
(
odp
->
flags
&
FLAG_ORDINAL
)
)
output
(
" NONAME"
);
if
(
is_data
)
output
(
" DATA"
);
if
(
is_data
)
output
(
" DATA"
);
if
(
odp
->
flags
&
FLAG_PRIVATE
)
output
(
" PRIVATE"
);
if
(
odp
->
flags
&
FLAG_PRIVATE
)
output
(
" PRIVATE"
);
output
(
"
\n
"
);
output
(
"
\n
"
);
...
...
tools/winebuild/winebuild.man.in
View file @
32433112
...
@@ -260,7 +260,8 @@ The entry point is not displayed in relay debugging traces (Win32
...
@@ -260,7 +260,8 @@ The entry point is not displayed in relay debugging traces (Win32
only).
only).
.TP
.TP
.B -noname
.B -noname
The entry point will be imported by ordinal instead of by name.
The entry point will be exported by ordinal instead of by name. The
name is still available for importing.
.TP
.TP
.B -ret16
.B -ret16
The function returns a 16-bit value (Win16 only).
The function returns a 16-bit value (Win16 only).
...
@@ -277,6 +278,10 @@ The function uses CPU register to pass arguments.
...
@@ -277,6 +278,10 @@ The function uses CPU register to pass arguments.
.B -private
.B -private
The function cannot be imported from other dlls, it can only be
The function cannot be imported from other dlls, it can only be
accessed through GetProcAddress.
accessed through GetProcAddress.
.TP
.B -ordinal
The entry point will be imported by ordinal instead of by name. The
name is still exported.
.SS "Function ordinals"
.SS "Function ordinals"
Syntax:
Syntax:
.br
.br
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment