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
db134ece
Commit
db134ece
authored
Jun 10, 2005
by
Pierre d'Herbemont
Committed by
Alexandre Julliard
Jun 10, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use .mod_*_func sections on Mac OS X/i386 instead of the elf
constructor/destructor.
parent
25c5fe33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
19 deletions
+17
-19
spec32.c
tools/winebuild/spec32.c
+17
-19
No files found.
tools/winebuild/spec32.c
View file @
db134ece
...
...
@@ -396,7 +396,23 @@ static void output_stub_funcs( FILE *outfile, DLLSPEC *spec )
*/
void
output_dll_init
(
FILE
*
outfile
,
const
char
*
constructor
,
const
char
*
destructor
)
{
#if defined(__i386__)
#ifdef __APPLE__
/* Mach-O doesn't have an init section */
if
(
constructor
)
{
fprintf
(
outfile
,
"asm(
\"\\
t.mod_init_func
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
t.align 2
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
t.long "
__ASM_NAME
(
"%s"
)
"
\\
n
\"\n
"
,
constructor
);
fprintf
(
outfile
,
"
\"\\
t.text
\\
n
\"
);
\n
"
);
}
if
(
destructor
)
{
fprintf
(
outfile
,
"asm(
\"\\
t.mod_term_func
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
t.align 2
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
t.long "
__ASM_NAME
(
"%s"
)
"
\\
n
\"\n
"
,
destructor
);
fprintf
(
outfile
,
"
\"\\
t.text
\\
n
\"
);
\n
"
);
}
#elif defined(__i386__)
if
(
constructor
)
{
fprintf
(
outfile
,
"asm(
\"\\
t.section
\\
t
\\\"
.init
\\\"
,
\\\"
ax
\\\"\\
n
\"\n
"
);
...
...
@@ -425,23 +441,6 @@ void output_dll_init( FILE *outfile, const char *constructor, const char *destru
fprintf
(
outfile
,
"
\"\\
t.section
\\
t
\\\"
.text
\\\"\\
n
\"
);
\n
"
);
}
#elif defined(__powerpc__)
# ifdef __APPLE__
/* Mach-O doesn't have an init section */
if
(
constructor
)
{
fprintf
(
outfile
,
"asm(
\"\\
t.mod_init_func
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
t.align 2
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
t.long "
__ASM_NAME
(
"%s"
)
"
\\
n
\"\n
"
,
constructor
);
fprintf
(
outfile
,
"
\"\\
t.text
\\
n
\"
);
\n
"
);
}
if
(
destructor
)
{
fprintf
(
outfile
,
"asm(
\"\\
t.mod_term_func
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
t.align 2
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
t.long "
__ASM_NAME
(
"%s"
)
"
\\
n
\"\n
"
,
destructor
);
fprintf
(
outfile
,
"
\"\\
t.text
\\
n
\"
);
\n
"
);
}
# else
/* __APPLE__ */
if
(
constructor
)
{
fprintf
(
outfile
,
"asm(
\"\\
t.section
\\
t
\\\"
.init
\\\"
,
\\\"
ax
\\\"\\
n
\"\n
"
);
...
...
@@ -454,7 +453,6 @@ void output_dll_init( FILE *outfile, const char *constructor, const char *destru
fprintf
(
outfile
,
"
\"\\
tbl "
__ASM_NAME
(
"%s"
)
"
\\
n
\"\n
"
,
destructor
);
fprintf
(
outfile
,
"
\"\\
t.section
\\
t
\\\"
.text
\\\"\\
n
\"
);
\n
"
);
}
# endif
/* __APPLE__ */
#elif defined(__ALPHA__)
if
(
constructor
)
{
...
...
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