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
32984a64
Commit
32984a64
authored
Jun 20, 2005
by
Wolfgang Thaller
Committed by
Alexandre Julliard
Jun 20, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use __ASM_NAME and HAVE_ASM_DOT_SIZE in a few places in winebuild
where they have been missing (needed for Darwin/x86).
parent
4bba2164
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
27 deletions
+28
-27
import.c
tools/winebuild/import.c
+8
-8
relay.c
tools/winebuild/relay.c
+20
-19
No files found.
tools/winebuild/import.c
View file @
32984a64
...
...
@@ -716,7 +716,7 @@ static void output_import_thunk( FILE *outfile, const char *name, const char *ta
fprintf
(
outfile
,
"
\"\\
tcall .L__wine_spec_%s
\\
n
\"\n
"
,
name
);
fprintf
(
outfile
,
"
\"
.L__wine_spec_%s:
\\
n
\"\n
"
,
name
);
fprintf
(
outfile
,
"
\"\\
tpopl %%eax
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
taddl $%d+
%s
-.L__wine_spec_%s,%%eax
\\
n
\"\n
"
,
pos
,
table
,
name
);
fprintf
(
outfile
,
"
\"\\
taddl $%d+
"
__ASM_NAME
(
"%s"
)
"
-.L__wine_spec_%s,%%eax
\\
n
\"\n
"
,
pos
,
table
,
name
);
if
(
!
strcmp
(
name
,
"__wine_call_from_16_regs"
))
fprintf
(
outfile
,
"
\"\\
t.byte 0x2e
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tmovl 0(%%eax),%%eax
\\
n
\"\n
"
);
...
...
@@ -729,7 +729,7 @@ static void output_import_thunk( FILE *outfile, const char *name, const char *ta
fprintf
(
outfile
,
"
\"\\
tcall .L__wine_spec_%s
\\
n
\"\n
"
,
name
);
fprintf
(
outfile
,
"
\"
.L__wine_spec_%s:
\\
n
\"\n
"
,
name
);
fprintf
(
outfile
,
"
\"\\
tpopl %%eax
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
taddl $%d+
%s
-.L__wine_spec_%s,%%eax
\\
n
\"\n
"
,
pos
,
table
,
name
);
fprintf
(
outfile
,
"
\"\\
taddl $%d+
"
__ASM_NAME
(
"%s"
)
"
-.L__wine_spec_%s,%%eax
\\
n
\"\n
"
,
pos
,
table
,
name
);
if
(
strstr
(
name
,
"__wine_call_from_16"
))
fprintf
(
outfile
,
"
\"\\
t.byte 0x2e
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tjmp *0(%%eax)
\\
n
\"\n
"
);
...
...
@@ -987,11 +987,11 @@ static void output_delayed_import_thunks( FILE *outfile, const DLLSPEC *spec )
fprintf
(
outfile
,
"
\"
"
__ASM_NAME
(
"__wine_delay_load_asm"
)
":
\\
n
\"\n
"
);
#if defined(__i386__)
fprintf
(
outfile
,
"
\"\\
tpushl %%ecx
\\
n
\\
tpushl %%edx
\\
n
\\
tpushl %%eax
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tcall
__wine_delay_load
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tcall
"
__ASM_NAME
(
"__wine_delay_load"
)
"
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tpopl %%edx
\\
n
\\
tpopl %%ecx
\\
n
\\
tjmp *%%eax
\\
n
\"\n
"
);
#elif defined(__sparc__)
fprintf
(
outfile
,
"
\"\\
tsave %%sp, -96, %%sp
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tcall
__wine_delay_load
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tcall
"
__ASM_NAME
(
"__wine_delay_load"
)
"
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tmov %%g1, %%o0
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tjmp %%o0
\\
n
\\
trestore
\\
n
\"\n
"
);
#elif defined(__powerpc__)
...
...
@@ -1047,7 +1047,7 @@ static void output_delayed_import_thunks( FILE *outfile, const DLLSPEC *spec )
/* branch to ctr register. */
fprintf
(
outfile
,
"
\"
bctr
\\
n
\"\n
"
);
#elif defined(__ALPHA__)
fprintf
(
outfile
,
"
\"\\
tjsr $26,
__wine_delay_load
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tjsr $26,
"
__ASM_NAME
(
"__wine_delay_load"
)
"
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tjmp $31,($0)
\\
n
\"\n
"
);
#else
#error You need to defined delayed import thunks for your architecture!
...
...
@@ -1068,10 +1068,10 @@ static void output_delayed_import_thunks( FILE *outfile, const DLLSPEC *spec )
fprintf
(
outfile
,
"
\"
"
__ASM_NAME
(
"%s"
)
":
\\
n
\"\n
"
,
buffer
);
#if defined(__i386__)
fprintf
(
outfile
,
"
\"\\
tmovl $%d, %%eax
\\
n
\"\n
"
,
(
idx
<<
16
)
|
j
);
fprintf
(
outfile
,
"
\"\\
tjmp
__wine_delay_load_asm
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tjmp
"
__ASM_NAME
(
"__wine_delay_load_asm"
)
"
\\
n
\"\n
"
);
#elif defined(__sparc__)
fprintf
(
outfile
,
"
\"\\
tset %d, %%g1
\\
n
\"\n
"
,
(
idx
<<
16
)
|
j
);
fprintf
(
outfile
,
"
\"\\
tb,a
__wine_delay_load_asm
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tb,a
"
__ASM_NAME
(
"__wine_delay_load_asm"
)
"
\\
n
\"\n
"
);
#elif defined(__powerpc__)
#ifdef __APPLE__
/* On Darwin we can use r0 and r2 */
...
...
@@ -1097,7 +1097,7 @@ static void output_delayed_import_thunks( FILE *outfile, const DLLSPEC *spec )
#elif defined(__ALPHA__)
fprintf
(
outfile
,
"
\"\\
tlda $0,%d($31)
\\
n
\"\n
"
,
j
);
fprintf
(
outfile
,
"
\"\\
tldah $0,%d($0)
\\
n
\"\n
"
,
idx
);
fprintf
(
outfile
,
"
\"\\
tjmp $31,
__wine_delay_load_asm
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tjmp $31,
"
__ASM_NAME
(
"__wine_delay_load_asm"
)
"
\\
n
\"\n
"
);
#else
#error You need to defined delayed import thunks for your architecture!
#endif
...
...
tools/winebuild/relay.c
View file @
32984a64
...
...
@@ -45,7 +45,9 @@ static void function_header( FILE *outfile, const char *name )
static
void
function_footer
(
FILE
*
outfile
,
const
char
*
name
)
{
fprintf
(
outfile
,
".size "
__ASM_NAME
(
"%s"
)
", . - "
__ASM_NAME
(
"%s"
)
"
\n
"
,
name
,
name
);
#ifdef HAVE_ASM_DOT_SIZE
fprintf
(
outfile
,
"
\t
.size "
__ASM_NAME
(
"%s"
)
", . - "
__ASM_NAME
(
"%s"
)
"
\n
"
,
name
,
name
);
#endif
}
/*******************************************************************
...
...
@@ -757,14 +759,14 @@ static void BuildRet16Func( FILE *outfile )
*/
static
void
BuildCallTo32CBClient
(
FILE
*
outfile
,
BOOL
isEx
)
{
const
char
*
name
=
isEx
?
"C
BClientEx"
:
"
CBClient"
;
const
char
*
name
=
isEx
?
"C
ALL32_CBClientEx"
:
"CALL32_
CBClient"
;
int
size
=
isEx
?
24
:
12
;
/* Function header */
fprintf
(
outfile
,
"
\n\t
.align %d
\n
"
,
get_alignment
(
4
)
);
fprintf
(
outfile
,
"
\t
.globl "
__ASM_NAME
(
"
CALL32_
%s"
)
"
\n
"
,
name
);
fprintf
(
outfile
,
__ASM_NAME
(
"
CALL32_
%s"
)
":
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
.globl "
__ASM_NAME
(
"%s"
)
"
\n
"
,
name
);
fprintf
(
outfile
,
__ASM_NAME
(
"%s"
)
":
\n
"
,
name
);
/* Entry code */
...
...
@@ -832,10 +834,10 @@ static void BuildCallTo32CBClient( FILE *outfile, BOOL isEx )
fprintf
(
outfile
,
"
\t
movl %%ebx, 0(%%edi)
\n
"
);
/* 16-bit ss:sp */
if
(
!
UsePIC
)
fprintf
(
outfile
,
"
\t
movl "
__ASM_NAME
(
"
CALL32_
%s_RetAddr"
)
", %%eax
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
movl "
__ASM_NAME
(
"%s_RetAddr"
)
", %%eax
\n
"
,
name
);
else
{
fprintf
(
outfile
,
"
\t
movl "
__ASM_NAME
(
"
CALL32_
%s_RetAddr@GOT"
)
"(%%edx), %%eax
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
movl "
__ASM_NAME
(
"%s_RetAddr@GOT"
)
"(%%edx), %%eax
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
movl (%%eax), %%eax
\n
"
);
}
fprintf
(
outfile
,
"
\t
movl %%eax, 4(%%edi)
\n
"
);
/* overwrite return address */
...
...
@@ -859,10 +861,10 @@ static void BuildCallTo32CBClient( FILE *outfile, BOOL isEx )
fprintf
(
outfile
,
"
\t
movl %%eax, 16(%%edi)
\n
"
);
if
(
!
UsePIC
)
fprintf
(
outfile
,
"
\t
movl "
__ASM_NAME
(
"
CALL32_
%s_RetAddr"
)
", %%eax
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
movl "
__ASM_NAME
(
"%s_RetAddr"
)
", %%eax
\n
"
,
name
);
else
{
fprintf
(
outfile
,
"
\t
movl "
__ASM_NAME
(
"
CALL32_
%s_RetAddr@GOT"
)
"(%%edx), %%eax
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
movl "
__ASM_NAME
(
"%s_RetAddr@GOT"
)
"(%%edx), %%eax
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
movl (%%eax), %%eax
\n
"
);
}
fprintf
(
outfile
,
"
\t
movl %%eax, 20(%%edi)
\n
"
);
...
...
@@ -913,17 +915,17 @@ static void BuildCallTo32CBClient( FILE *outfile, BOOL isEx )
fprintf
(
outfile
,
"
\t
popl %%edi
\n
"
);
fprintf
(
outfile
,
"
\t
popl %%ebp
\n
"
);
fprintf
(
outfile
,
"
\t
ret
\n
"
);
f
printf
(
outfile
,
".size "
__ASM_NAME
(
"CALL32_%s"
)
", . - "
__ASM_NAME
(
"CALL32_%s"
)
"
\n
"
,
nam
e
,
name
);
f
unction_footer
(
outfil
e
,
name
);
}
static
void
BuildCallTo32CBClientRet
(
FILE
*
outfile
,
BOOL
isEx
)
{
const
char
*
name
=
isEx
?
"C
BClientEx"
:
"CBClien
t"
;
const
char
*
name
=
isEx
?
"C
ALL32_CBClientEx_Ret"
:
"CALL32_CBClient_Re
t"
;
/* '16-bit' return stub */
fprintf
(
outfile
,
"
\n\t
.globl "
__ASM_NAME
(
"
CALL32_%s_Ret
"
)
"
\n
"
,
name
);
fprintf
(
outfile
,
__ASM_NAME
(
"
CALL32_%s_Ret
"
)
":
\n
"
,
name
);
fprintf
(
outfile
,
"
\n\t
.globl "
__ASM_NAME
(
"
%s
"
)
"
\n
"
,
name
);
fprintf
(
outfile
,
__ASM_NAME
(
"
%s
"
)
":
\n
"
,
name
);
if
(
!
isEx
)
{
...
...
@@ -938,13 +940,12 @@ static void BuildCallTo32CBClientRet( FILE *outfile, BOOL isEx )
fprintf
(
outfile
,
"
\t
lssl %%ss:-12(%%ebx), %%esp
\n
"
);
}
fprintf
(
outfile
,
"
\t
lret
\n
"
);
fprintf
(
outfile
,
".size "
__ASM_NAME
(
"CALL32_%s_Ret"
)
", . - "
__ASM_NAME
(
"CALL32_%s_Ret"
)
"
\n
"
,
name
,
name
);
function_footer
(
outfile
,
name
);
/* Declare the return address variable */
fprintf
(
outfile
,
"
\n\t
.globl "
__ASM_NAME
(
"
CALL32_%s_Ret
Addr"
)
"
\n
"
,
name
);
fprintf
(
outfile
,
__ASM_NAME
(
"
CALL32_%s_Ret
Addr"
)
":
\t
.long 0
\n
"
,
name
);
fprintf
(
outfile
,
"
\n\t
.globl "
__ASM_NAME
(
"
%s
Addr"
)
"
\n
"
,
name
);
fprintf
(
outfile
,
__ASM_NAME
(
"
%s
Addr"
)
":
\t
.long 0
\n
"
,
name
);
}
...
...
@@ -1177,7 +1178,7 @@ void BuildRelays16( FILE *outfile )
fprintf
(
outfile
,
__ASM_NAME
(
"Call16_End"
)
":
\n
"
);
fprintf
(
outfile
,
"
\t
.globl "
__ASM_NAME
(
"Call16_End"
)
"
\n
"
);
f
printf
(
outfile
,
"
\t
.size "
__ASM_NAME
(
"__wine_spec_thunk_text_16"
)
",. - "
__ASM_NAME
(
"__wine_spec_thunk_text_16"
)
"
\n
"
);
f
unction_footer
(
outfile
,
"__wine_spec_thunk_text_16
"
);
/* The whole Call16_Ret segment must lie within the .data section */
fprintf
(
outfile
,
"
\n\t
.data
\n
"
);
...
...
@@ -1200,7 +1201,7 @@ void BuildRelays16( FILE *outfile )
/* End of Call16_Ret segment */
fprintf
(
outfile
,
"
\n\t
.globl "
__ASM_NAME
(
"Call16_Ret_End"
)
"
\n
"
);
fprintf
(
outfile
,
__ASM_NAME
(
"Call16_Ret_End"
)
":
\n
"
);
f
printf
(
outfile
,
"
\t
.size "
__ASM_NAME
(
"__wine_spec_thunk_data_16"
)
",. - "
__ASM_NAME
(
"__wine_spec_thunk_data_16"
)
"
\n
"
);
f
unction_footer
(
outfile
,
"__wine_spec_thunk_data_16
"
);
}
/*******************************************************************
...
...
@@ -1219,7 +1220,7 @@ void BuildRelays32( FILE *outfile )
/* 32-bit register entry point */
BuildCallFrom32Regs
(
outfile
);
f
printf
(
outfile
,
"
\t
.size "
__ASM_NAME
(
"__wine_spec_thunk_text_32"
)
",. - "
__ASM_NAME
(
"__wine_spec_thunk_text_32"
)
"
\n
"
);
f
unction_footer
(
outfile
,
"__wine_spec_thunk_text_32
"
);
}
#else
/* __i386__ */
...
...
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