Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
9fd831f6
Commit
9fd831f6
authored
Dec 06, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't make the spec file constructors static so that they don't get
optimized out.
parent
447ddfd3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
27 deletions
+31
-27
spec16.c
tools/winebuild/spec16.c
+14
-12
spec32.c
tools/winebuild/spec32.c
+17
-15
No files found.
tools/winebuild/spec16.c
View file @
9fd831f6
...
...
@@ -771,18 +771,20 @@ void BuildSpec16File( FILE *outfile )
/* Output the DLL constructor */
fprintf
(
outfile
,
"#ifdef __GNUC__
\n
"
);
fprintf
(
outfile
,
"static void init(void) __attribute__((unused));
\n
"
);
fprintf
(
outfile
,
"#else /* defined(__GNUC__) */
\n
"
);
fprintf
(
outfile
,
"static void __asm__dummy_dll_init(void) {
\n
"
);
fprintf
(
outfile
,
"#endif /* defined(__GNUC__) */
\n
"
);
fprintf
(
outfile
,
"asm(
\"\\
t.section
\t
.init ,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tcall init
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
t.previous
\\
n
\"
);
\n
"
);
fprintf
(
outfile
,
"#ifndef __GNUC__
\n
"
);
fprintf
(
outfile
,
"}
\n
"
);
fprintf
(
outfile
,
"#endif /* defined(__GNUC__) */
\n
"
);
fprintf
(
outfile
,
"static void init(void) { __wine_register_dll_16( &descriptor ); }
\n
"
);
fprintf
(
outfile
,
"#ifndef __GNUC__
\n
"
"static void __asm__dummy_dll_init(void) {
\n
"
"#endif /* defined(__GNUC__) */
\n
"
"asm(
\"\\
t.section
\t
.init ,
\\\"
ax
\\\"\\
n
\"\n
"
"
\"\\
tcall "
PREFIX
"__wine_spec_%s_init
\\
n
\"\n
"
"
\"\\
t.previous
\\
n
\"
);
\n
"
"#ifndef __GNUC__
\n
"
"}
\n
"
"#endif /* defined(__GNUC__) */
\n\n
"
"void __wine_spec_%s_init(void)
\n
"
"{
\n
"
" __wine_register_dll_16( &descriptor );
\n
"
"}
\n
"
,
DLLName
,
DLLName
);
}
...
...
tools/winebuild/spec32.c
View file @
9fd831f6
...
...
@@ -670,38 +670,40 @@ void BuildSpec32File( FILE *outfile )
/* Output the DLL constructor */
fprintf
(
outfile
,
"#ifdef __GNUC__
\n
"
);
fprintf
(
outfile
,
"static void init(void) __attribute__((unused));
\n
"
);
if
(
nr_debug
)
fprintf
(
outfile
,
"static void fini(void) __attribute__((unused));
\n
"
);
fprintf
(
outfile
,
"#else /* defined(__GNUC__) */
\n
"
);
fprintf
(
outfile
,
"#ifndef __GNUC__
\n
"
);
fprintf
(
outfile
,
"static void __asm__dummy_dll_init(void) {
\n
"
);
fprintf
(
outfile
,
"#endif /* defined(__GNUC__) */
\n
"
);
fprintf
(
outfile
,
"asm(
\"\\
t.section
\t
.init ,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tcall
init
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tcall
"
PREFIX
"__wine_spec_%s_init
\\
n
\"\n
"
,
DLLName
);
fprintf
(
outfile
,
"
\"\\
t.previous
\\
n
\"
);
\n
"
);
if
(
nr_debug
)
{
fprintf
(
outfile
,
"asm(
\"\\
t.section
\t
.fini ,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tcall
fini
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tcall
"
PREFIX
"__wine_spec_%s_fini
\\
n
\"\n
"
,
DLLName
);
fprintf
(
outfile
,
"
\"\\
t.previous
\\
n
\"
);
\n
"
);
}
fprintf
(
outfile
,
"#ifndef __GNUC__
\n
"
);
fprintf
(
outfile
,
"}
\n
"
);
fprintf
(
outfile
,
"#endif /* defined(__GNUC__) */
\n\n
"
);
fprintf
(
outfile
,
"static void init(void)
\n
{
\n
"
);
fprintf
(
outfile
,
" extern void __wine_dll_register( const struct image_nt_headers *, const char * );
\n
"
);
fprintf
(
outfile
,
" extern void *__wine_dbg_register( char * const *, int );
\n
"
);
fprintf
(
outfile
,
" __wine_dll_register( &nt_header,
\"
%s
\"
);
\n
"
,
DLLFileName
);
fprintf
(
outfile
,
"void __wine_spec_%s_init(void)
\n
"
"{
\n
"
" extern void __wine_dll_register( const struct image_nt_headers *, const char * );
\n
"
" extern void *__wine_dbg_register( char * const *, int );
\n
"
" __wine_dll_register( &nt_header,
\"
%s
\"
);
\n
"
,
DLLName
,
DLLFileName
);
if
(
nr_debug
)
fprintf
(
outfile
,
" debug_registration = __wine_dbg_register( debug_channels, %d );
\n
"
,
nr_debug
);
fprintf
(
outfile
,
"}
\n
"
);
if
(
nr_debug
)
{
fprintf
(
outfile
,
"
\n
static void fini(void)
\n
{
\n
"
);
fprintf
(
outfile
,
" extern void __wine_dbg_unregister( void * );
\n
"
);
fprintf
(
outfile
,
" __wine_dbg_unregister( debug_registration );
\n
"
);
fprintf
(
outfile
,
"}
\n
"
);
fprintf
(
outfile
,
"
\n
void __wine_spec_%s_fini(void)
\n
"
"{
\n
"
" extern void __wine_dbg_unregister( void* );
\n
"
" __wine_dbg_unregister( debug_registration );
\n
"
"}
\n
"
,
DLLName
);
}
}
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