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
0ba5ade8
Commit
0ba5ade8
authored
Mar 22, 2004
by
Pierre d'Herbemont
Committed by
Alexandre Julliard
Mar 22, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Darwin support for _init/_fini functions and _end symbol.
parent
bb2724ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
spec32.c
tools/winebuild/spec32.c
+21
-0
No files found.
tools/winebuild/spec32.c
View file @
0ba5ade8
...
...
@@ -522,7 +522,12 @@ void BuildSpec32File( FILE *outfile, DLLSPEC *spec )
fprintf
(
outfile
,
"}
\n
"
);
fprintf
(
outfile
,
"#endif
\n
"
);
#ifdef __APPLE__
fprintf
(
outfile
,
"static char _end[4];
\n
"
);
#else
fprintf
(
outfile
,
"extern char _end[];
\n
"
);
#endif
fprintf
(
outfile
,
"extern int __wine_spec_data_start[], __wine_spec_exports[];
\n\n
"
);
#ifdef __i386__
...
...
@@ -569,8 +574,24 @@ void BuildSpec32File( FILE *outfile, DLLSPEC *spec )
fprintf
(
outfile
,
"extern char **__wine_main_argv;
\n
"
);
fprintf
(
outfile
,
"extern char **__wine_main_environ;
\n
"
);
fprintf
(
outfile
,
"extern unsigned short **__wine_main_wargv;
\n
"
);
#ifdef __APPLE__
fprintf
(
outfile
,
"extern _dyld_func_lookup(char *, void *);"
);
fprintf
(
outfile
,
"void _init(int argc, char** argv, char** chr)
\n
"
);
fprintf
(
outfile
,
"{
\n
"
);
fprintf
(
outfile
,
" void (*init)(void);
\n
"
);
fprintf
(
outfile
,
" _dyld_func_lookup(
\"
__dyld_make_delayed_module_initializer_calls
\"
, (unsigned long *)&init);
\n
"
);
fprintf
(
outfile
,
" init();
\n
"
);
fprintf
(
outfile
,
"}
\n
"
);
fprintf
(
outfile
,
"void _fini()
\n
"
);
fprintf
(
outfile
,
"{
\n
"
);
fprintf
(
outfile
,
" void (*fini)(void);
\n
"
);
fprintf
(
outfile
,
" _dyld_func_lookup(
\"
__dyld_mod_term_funcs
\"
, (unsigned long *)&fini);
\n
"
);
fprintf
(
outfile
,
" fini();
\n
"
);
fprintf
(
outfile
,
"}
\n
"
);
#else
fprintf
(
outfile
,
"extern void _init(int, char**, char**);
\n
"
);
fprintf
(
outfile
,
"extern void _fini();
\n
"
);
#endif
characteristics
=
subsystem
=
0
;
switch
(
spec
->
mode
)
...
...
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