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
13baa7b3
Commit
13baa7b3
authored
Sep 15, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a common function to declare global symbols, and make them
hidden on platforms that support it.
parent
08414826
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
22 deletions
+31
-22
build.h
tools/winebuild/build.h
+1
-0
import.c
tools/winebuild/import.c
+2
-4
relay.c
tools/winebuild/relay.c
+7
-14
spec32.c
tools/winebuild/spec32.c
+2
-4
utils.c
tools/winebuild/utils.c
+19
-0
No files found.
tools/winebuild/build.h
View file @
13baa7b3
...
...
@@ -185,6 +185,7 @@ extern unsigned int get_ptr_size(void);
extern
const
char
*
asm_name
(
const
char
*
func
);
extern
const
char
*
func_declaration
(
const
char
*
func
);
extern
const
char
*
func_size
(
const
char
*
func
);
extern
const
char
*
asm_globl
(
const
char
*
func
);
extern
const
char
*
get_asm_ptr_keyword
(
void
);
extern
const
char
*
get_asm_string_keyword
(
void
);
extern
const
char
*
get_asm_short_keyword
(
void
);
...
...
tools/winebuild/import.c
View file @
13baa7b3
...
...
@@ -615,8 +615,7 @@ static void output_import_thunk( FILE *outfile, const char *name, const char *ta
{
fprintf
(
outfile
,
"
\n\t
.align %d
\n
"
,
get_alignment
(
4
)
);
fprintf
(
outfile
,
"
\t
%s
\n
"
,
func_declaration
(
name
)
);
fprintf
(
outfile
,
"
\t
.globl %s
\n
"
,
asm_name
(
name
)
);
fprintf
(
outfile
,
"%s:
\n
"
,
asm_name
(
name
)
);
fprintf
(
outfile
,
"%s
\n
"
,
asm_globl
(
name
)
);
switch
(
target_cpu
)
{
...
...
@@ -854,8 +853,7 @@ static void output_delayed_imports( FILE *outfile, const DLLSPEC *spec )
fprintf
(
outfile
,
"
\n
/* delayed imports */
\n\n
"
);
fprintf
(
outfile
,
"
\t
.data
\n
"
);
fprintf
(
outfile
,
"
\t
.align %d
\n
"
,
get_alignment
(
get_ptr_size
())
);
fprintf
(
outfile
,
"
\t
.globl %s
\n
"
,
asm_name
(
"__wine_spec_delay_imports"
)
);
fprintf
(
outfile
,
"%s:
\n
"
,
asm_name
(
"__wine_spec_delay_imports"
));
fprintf
(
outfile
,
"%s
\n
"
,
asm_globl
(
"__wine_spec_delay_imports"
)
);
/* list of dlls */
...
...
tools/winebuild/relay.c
View file @
13baa7b3
...
...
@@ -36,8 +36,7 @@ static void function_header( FILE *outfile, const char *name )
{
fprintf
(
outfile
,
"
\n\t
.align %d
\n
"
,
get_alignment
(
4
)
);
fprintf
(
outfile
,
"
\t
%s
\n
"
,
func_declaration
(
name
)
);
fprintf
(
outfile
,
"
\t
.globl %s
\n
"
,
asm_name
(
name
)
);
fprintf
(
outfile
,
"%s:
\n
"
,
asm_name
(
name
)
);
fprintf
(
outfile
,
"%s
\n
"
,
asm_globl
(
name
)
);
}
...
...
@@ -900,14 +899,12 @@ static void BuildPendingEventCheck( FILE *outfile )
/* Start cleanup. Restore fs register. */
fprintf
(
outfile
,
"
\t
.globl %s
\n
"
,
asm_name
(
"DPMI_PendingEventCheck_Cleanup"
)
);
fprintf
(
outfile
,
"%s:
\n
"
,
asm_name
(
"DPMI_PendingEventCheck_Cleanup"
)
);
fprintf
(
outfile
,
"%s
\n
"
,
asm_globl
(
"DPMI_PendingEventCheck_Cleanup"
)
);
fprintf
(
outfile
,
"
\t
popw %%fs
\n
"
);
/* Return from function. */
fprintf
(
outfile
,
"
\t
.globl %s
\n
"
,
asm_name
(
"DPMI_PendingEventCheck_Return"
)
);
fprintf
(
outfile
,
"%s:
\n
"
,
asm_name
(
"DPMI_PendingEventCheck_Return"
)
);
fprintf
(
outfile
,
"%s
\n
"
,
asm_globl
(
"DPMI_PendingEventCheck_Return"
)
);
fprintf
(
outfile
,
"
\t
iret
\n
"
);
function_footer
(
outfile
,
"DPMI_PendingEventCheck"
);
...
...
@@ -934,8 +931,7 @@ void BuildRelays16( FILE *outfile )
fprintf
(
outfile
,
"%s:
\n\n
"
,
asm_name
(
"__wine_spec_thunk_text_16"
)
);
fprintf
(
outfile
,
"
\t
.globl %s
\n
"
,
asm_name
(
"__wine_call16_start"
)
);
fprintf
(
outfile
,
"%s:
\n
"
,
asm_name
(
"__wine_call16_start"
)
);
fprintf
(
outfile
,
"%s
\n
"
,
asm_globl
(
"__wine_call16_start"
)
);
/* Standard CallFrom16 routine (WORD return) */
BuildCallFrom16Core
(
outfile
,
FALSE
,
FALSE
,
TRUE
);
...
...
@@ -967,16 +963,13 @@ void BuildRelays16( FILE *outfile )
/* Pending DPMI events check stub */
BuildPendingEventCheck
(
outfile
);
fprintf
(
outfile
,
"
\t
.globl %s
\n
"
,
asm_name
(
"__wine_call16_end"
)
);
fprintf
(
outfile
,
"%s:
\n
"
,
asm_name
(
"__wine_call16_end"
)
);
fprintf
(
outfile
,
"%s
\n
"
,
asm_globl
(
"__wine_call16_end"
)
);
function_footer
(
outfile
,
"__wine_spec_thunk_text_16"
);
/* Declare the return address and data selector variables */
fprintf
(
outfile
,
"
\n\t
.data
\n\t
.align %d
\n
"
,
get_alignment
(
4
)
);
fprintf
(
outfile
,
"
\t
.globl %s
\n
"
,
asm_name
(
"CallTo16_DataSelector"
)
);
fprintf
(
outfile
,
"%s:
\t
.long 0
\n
"
,
asm_name
(
"CallTo16_DataSelector"
)
);
fprintf
(
outfile
,
"
\t
.globl %s
\n
"
,
asm_name
(
"CallTo16_TebSelector"
)
);
fprintf
(
outfile
,
"%s:
\t
.long 0
\n
"
,
asm_name
(
"CallTo16_TebSelector"
)
);
fprintf
(
outfile
,
"%s
\n\t
.long 0
\n
"
,
asm_globl
(
"CallTo16_DataSelector"
)
);
fprintf
(
outfile
,
"%s
\n\t
.long 0
\n
"
,
asm_globl
(
"CallTo16_TebSelector"
)
);
if
(
UsePIC
)
fprintf
(
outfile
,
"wine_ldt_copy_ptr:
\t
.long %s
\n
"
,
asm_name
(
"wine_ldt_copy"
)
);
}
...
...
tools/winebuild/spec32.c
View file @
13baa7b3
...
...
@@ -482,8 +482,7 @@ void BuildSpec32File( FILE *outfile, DLLSPEC *spec )
fprintf
(
outfile
,
"
\n\t
.data
\n
"
);
fprintf
(
outfile
,
"
\t
.align %d
\n
"
,
get_alignment
(
get_ptr_size
())
);
fprintf
(
outfile
,
"
\t
.globl %s
\n
"
,
asm_name
(
"__wine_spec_nt_header"
)
);
fprintf
(
outfile
,
"%s:
\n
"
,
asm_name
(
"__wine_spec_nt_header"
));
fprintf
(
outfile
,
"%s
\n
"
,
asm_globl
(
"__wine_spec_nt_header"
)
);
fprintf
(
outfile
,
"
\t
.long 0x%04x
\n
"
,
IMAGE_NT_SIGNATURE
);
/* Signature */
switch
(
target_cpu
)
...
...
@@ -575,8 +574,7 @@ void BuildSpec32File( FILE *outfile, DLLSPEC *spec )
fprintf
(
outfile
,
"
\t
.long 0,0
\n
"
);
/* DataDirectory[15] */
fprintf
(
outfile
,
"
\n\t
%s
\n
"
,
get_asm_string_section
()
);
fprintf
(
outfile
,
"
\t
.globl %s
\n
"
,
asm_name
(
"__wine_spec_file_name"
)
);
fprintf
(
outfile
,
"%s:
\n
"
,
asm_name
(
"__wine_spec_file_name"
));
fprintf
(
outfile
,
"%s
\n
"
,
asm_globl
(
"__wine_spec_file_name"
)
);
fprintf
(
outfile
,
"
\t
%s
\"
%s
\"\n
"
,
get_asm_string_keyword
(),
spec
->
file_name
);
if
(
target_platform
==
PLATFORM_APPLE
)
fprintf
(
outfile
,
"
\t
.comm %s,4
\n
"
,
asm_name
(
"_end"
)
);
...
...
tools/winebuild/utils.c
View file @
13baa7b3
...
...
@@ -470,6 +470,25 @@ const char *func_size( const char *func )
}
}
/* return a global symbol declaration for an assembly symbol */
const
char
*
asm_globl
(
const
char
*
func
)
{
static
char
buffer
[
256
];
switch
(
target_platform
)
{
case
PLATFORM_APPLE
:
sprintf
(
buffer
,
"
\t
.globl _%s
\n\t
.private_extern _%s
\n
_%s:"
,
func
,
func
,
func
);
return
buffer
;
case
PLATFORM_WINDOWS
:
sprintf
(
buffer
,
"
\t
.globl _%s
\n
_%s:"
,
func
,
func
);
return
buffer
;
default:
sprintf
(
buffer
,
"
\t
.globl %s
\n\t
.hidden %s
\n
%s:"
,
func
,
func
,
func
);
return
buffer
;
}
}
const
char
*
get_asm_ptr_keyword
(
void
)
{
switch
(
get_ptr_size
())
...
...
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