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
803eb16d
Commit
803eb16d
authored
Jul 05, 2002
by
Gregg Mattinson
Committed by
Alexandre Julliard
Jul 05, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Replaced .previous with a .section statement for the appropriate
section. - '.section .text' is incorrect. It should be '.section ".text"'.
parent
d389c4ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
28 deletions
+42
-28
import.c
tools/winebuild/import.c
+2
-2
main.c
tools/winebuild/main.c
+9
-0
spec32.c
tools/winebuild/spec32.c
+31
-26
No files found.
tools/winebuild/import.c
View file @
803eb16d
...
@@ -529,7 +529,7 @@ static int output_immediate_imports( FILE *outfile )
...
@@ -529,7 +529,7 @@ static int output_immediate_imports( FILE *outfile )
}
}
pos
+=
4
;
pos
+=
4
;
}
}
fprintf
(
outfile
,
"
\"
.
previous
\"
);
\n
#ifndef __GNUC__
\n
}
\n
#endif
\n\n
"
);
fprintf
(
outfile
,
"
\"
.
section
\\
t
\\\"
.text
\\\"
\"
);
\n
#ifndef __GNUC__
\n
}
\n
#endif
\n\n
"
);
done:
done:
return
nb_imm
;
return
nb_imm
;
...
@@ -735,7 +735,7 @@ static int output_delayed_imports( FILE *outfile )
...
@@ -735,7 +735,7 @@ static int output_delayed_imports( FILE *outfile )
fprintf
(
outfile
,
"
\"\n
"
);
fprintf
(
outfile
,
"
\"\n
"
);
}
}
}
}
fprintf
(
outfile
,
"
\"
.
previous
\"
);
\n
"
);
fprintf
(
outfile
,
"
\"
.
section
\\\"
.text
\\\"
\"
);
\n
"
);
fprintf
(
outfile
,
"#ifndef __GNUC__
\n
"
);
fprintf
(
outfile
,
"#ifndef __GNUC__
\n
"
);
fprintf
(
outfile
,
"}
\n
"
);
fprintf
(
outfile
,
"}
\n
"
);
fprintf
(
outfile
,
"#endif
\n
"
);
fprintf
(
outfile
,
"#endif
\n
"
);
...
...
tools/winebuild/main.c
View file @
803eb16d
...
@@ -118,6 +118,7 @@ static void do_warnings(void);
...
@@ -118,6 +118,7 @@ static void do_warnings(void);
static
void
do_f_flags
(
const
char
*
arg
);
static
void
do_f_flags
(
const
char
*
arg
);
static
void
do_define
(
const
char
*
arg
);
static
void
do_define
(
const
char
*
arg
);
static
void
do_include
(
const
char
*
arg
);
static
void
do_include
(
const
char
*
arg
);
static
void
do_k_flags
(
const
char
*
arg
);
static
void
do_exe_mode
(
const
char
*
arg
);
static
void
do_exe_mode
(
const
char
*
arg
);
static
void
do_module
(
const
char
*
arg
);
static
void
do_module
(
const
char
*
arg
);
static
void
do_spec
(
const
char
*
arg
);
static
void
do_spec
(
const
char
*
arg
);
...
@@ -142,6 +143,7 @@ static const struct option_descr option_table[] =
...
@@ -142,6 +143,7 @@ static const struct option_descr option_table[] =
{
"-f"
,
1
,
do_f_flags
,
"-f flags Compiler flags (only -fPIC is supported)"
},
{
"-f"
,
1
,
do_f_flags
,
"-f flags Compiler flags (only -fPIC is supported)"
},
{
"-D"
,
1
,
do_define
,
"-D sym Ignored for C flags compatibility"
},
{
"-D"
,
1
,
do_define
,
"-D sym Ignored for C flags compatibility"
},
{
"-I"
,
1
,
do_include
,
"-I dir Ignored for C flags compatibility"
},
{
"-I"
,
1
,
do_include
,
"-I dir Ignored for C flags compatibility"
},
{
"-K"
,
1
,
do_k_flags
,
"-K flags Compiler flags (only -KPIC is supported)"
},
{
"-m"
,
1
,
do_exe_mode
,
"-m mode Set the executable mode (cui|gui|cuiw|guiw)"
},
{
"-m"
,
1
,
do_exe_mode
,
"-m mode Set the executable mode (cui|gui|cuiw|guiw)"
},
{
"-M"
,
1
,
do_module
,
"-M module Set the name of the main (Win32) module for a Win16 dll"
},
{
"-M"
,
1
,
do_module
,
"-M module Set the name of the main (Win32) module for a Win16 dll"
},
{
"-L"
,
1
,
do_lib
,
"-L directory Look for imports libraries in 'directory'"
},
{
"-L"
,
1
,
do_lib
,
"-L directory Look for imports libraries in 'directory'"
},
...
@@ -207,6 +209,13 @@ static void do_include( const char *arg )
...
@@ -207,6 +209,13 @@ static void do_include( const char *arg )
/* nothing */
/* nothing */
}
}
static
void
do_k_flags
(
const
char
*
arg
)
{
/* Ignored, because cc generates correct code. */
/* if (!strcmp( arg, "PIC" )) UsePIC = 1; */
/* ignore all other flags */
}
static
void
do_spec
(
const
char
*
arg
)
static
void
do_spec
(
const
char
*
arg
)
{
{
char
*
p
;
char
*
p
;
...
...
tools/winebuild/spec32.c
View file @
803eb16d
...
@@ -335,6 +335,8 @@ static int output_exports( FILE *outfile, int nr_exports )
...
@@ -335,6 +335,8 @@ static int output_exports( FILE *outfile, int nr_exports )
}
}
}
}
fprintf
(
outfile
,
"
\"\\
t.text
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
t.align %d
\\
n
\"\n
"
,
get_alignment
(
4
)
);
fprintf
(
outfile
,
");
\n\n
"
);
fprintf
(
outfile
,
");
\n\n
"
);
return
total_size
;
return
total_size
;
...
@@ -439,43 +441,43 @@ void output_dll_init( FILE *outfile, const char *constructor, const char *destru
...
@@ -439,43 +441,43 @@ void output_dll_init( FILE *outfile, const char *constructor, const char *destru
#if defined(__i386__)
#if defined(__i386__)
if
(
constructor
)
if
(
constructor
)
{
{
fprintf
(
outfile
,
"asm(
\"\\
t.section
\
t
.init
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"asm(
\"\\
t.section
\
\
t
\\\"
.init
\\\"
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tcall "
PREFIX
"%s
\\
n
\"\n
"
,
constructor
);
fprintf
(
outfile
,
"
\"\\
tcall "
PREFIX
"%s
\\
n
\"\n
"
,
constructor
);
fprintf
(
outfile
,
"
\"\\
t.
previous
\\
n
\"
);
\n
"
);
fprintf
(
outfile
,
"
\"\\
t.
section
\\
t
\\\"
.text
\\\"
\\
n
\"
);
\n
"
);
}
}
if
(
destructor
)
if
(
destructor
)
{
{
fprintf
(
outfile
,
"asm(
\"\\
t.section
\
t
.fini
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"asm(
\"\\
t.section
\
\
t
\\\"
.fini
\\\"
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tcall "
PREFIX
"%s
\\
n
\"\n
"
,
destructor
);
fprintf
(
outfile
,
"
\"\\
tcall "
PREFIX
"%s
\\
n
\"\n
"
,
destructor
);
fprintf
(
outfile
,
"
\"\\
t.
previous
\\
n
\"
);
\n
"
);
fprintf
(
outfile
,
"
\"\\
t.
section
\\
t
\\\"
.text
\\\"
\\
n
\"
);
\n
"
);
}
}
#elif defined(__sparc__)
#elif defined(__sparc__)
if
(
constructor
)
if
(
constructor
)
{
{
fprintf
(
outfile
,
"asm(
\"\\
t.section
\
t
.init
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"asm(
\"\\
t.section
\
\
t
\\\"
.init
\\\"
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tcall "
PREFIX
"%s
\\
n
\"\n
"
,
constructor
);
fprintf
(
outfile
,
"
\"\\
tcall "
PREFIX
"%s
\\
n
\"\n
"
,
constructor
);
fprintf
(
outfile
,
"
\"\\
tnop
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tnop
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
t.
previous
\\
n
\"
);
\n
"
);
fprintf
(
outfile
,
"
\"\\
t.
section
\\
t
\\\"
.text
\\\"
\\
n
\"
);
\n
"
);
}
}
if
(
destructor
)
if
(
destructor
)
{
{
fprintf
(
outfile
,
"asm(
\"\\
t.section
\
t
.fini
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"asm(
\"\\
t.section
\
\
t
\\\"
.fini
\\\"
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tcall "
PREFIX
"%s
\\
n
\"\n
"
,
destructor
);
fprintf
(
outfile
,
"
\"\\
tcall "
PREFIX
"%s
\\
n
\"\n
"
,
destructor
);
fprintf
(
outfile
,
"
\"\\
tnop
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tnop
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
t.
previous
\\
n
\"
);
\n
"
);
fprintf
(
outfile
,
"
\"\\
t.
section
\\
t
\\\"
.text
\\\"
\\
n
\"
);
\n
"
);
}
}
#elif defined(__PPC__)
#elif defined(__PPC__)
if
(
constructor
)
if
(
constructor
)
{
{
fprintf
(
outfile
,
"asm(
\"\\
t.section
\
t
.init
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"asm(
\"\\
t.section
\
\
t
\\\"
.init
\\\"
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tbl "
PREFIX
"%s
\\
n
\"\n
"
,
constructor
);
fprintf
(
outfile
,
"
\"\\
tbl "
PREFIX
"%s
\\
n
\"\n
"
,
constructor
);
fprintf
(
outfile
,
"
\"\\
t.
previous
\\
n
\"
);
\n
"
);
fprintf
(
outfile
,
"
\"\\
t.
section
\\
t
\\\"
.text
\\\"
\\
n
\"
);
\n
"
);
}
}
if
(
destructor
)
if
(
destructor
)
{
{
fprintf
(
outfile
,
"asm(
\"\\
t.section
\
t
.fini
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"asm(
\"\\
t.section
\
\
t
\\\"
.fini
\\\"
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tbl "
PREFIX
"%s
\\
n
\"\n
"
,
destructor
);
fprintf
(
outfile
,
"
\"\\
tbl "
PREFIX
"%s
\\
n
\"\n
"
,
destructor
);
fprintf
(
outfile
,
"
\"\\
t.
previous
\\
n
\"
);
\n
"
);
fprintf
(
outfile
,
"
\"\\
t.
section
\\
t
\\\"
.text
\\\"
\\
n
\"
);
\n
"
);
}
}
#else
#else
#error You need to define the DLL constructor for your architecture
#error You need to define the DLL constructor for your architecture
...
@@ -522,9 +524,15 @@ void BuildSpec32File( FILE *outfile )
...
@@ -522,9 +524,15 @@ void BuildSpec32File( FILE *outfile )
/* Reserve some space for the PE header */
/* Reserve some space for the PE header */
fprintf
(
outfile
,
"extern char pe_header[];
\n
"
);
fprintf
(
outfile
,
"extern char pe_header[];
\n
"
);
fprintf
(
outfile
,
"asm(
\"
.section .text
\\
n
\\
t
\"\n
"
);
fprintf
(
outfile
,
"#ifndef __GNUC__
\n
"
);
fprintf
(
outfile
,
"static void __asm__dummy_header(void) {
\n
"
);
fprintf
(
outfile
,
"#endif
\n
"
);
fprintf
(
outfile
,
"asm(
\"
.section
\\\"
.text
\\\"\\
n
\\
t
\"\n
"
);
fprintf
(
outfile
,
"
\"
.align %d
\\
n
\"\n
"
,
get_alignment
(
page_size
)
);
fprintf
(
outfile
,
"
\"
.align %d
\\
n
\"\n
"
,
get_alignment
(
page_size
)
);
fprintf
(
outfile
,
"
\"
"
PREFIX
"pe_header:
\\
t.fill %ld,1,0
\\
n
\\
t
\"
);
\n
"
,
page_size
);
fprintf
(
outfile
,
"
\"
"
PREFIX
"pe_header:
\\
t.skip %ld
\\
n
\\
t
\"
);
\n
"
,
page_size
);
fprintf
(
outfile
,
"#ifndef __GNUC__
\n
"
);
fprintf
(
outfile
,
"}
\n
"
);
fprintf
(
outfile
,
"#endif
\n
"
);
fprintf
(
outfile
,
"static const char dllname[] =
\"
%s
\"
;
\n\n
"
,
DLLFileName
);
fprintf
(
outfile
,
"static const char dllname[] =
\"
%s
\"
;
\n\n
"
,
DLLFileName
);
fprintf
(
outfile
,
"extern int __wine_spec_exports[];
\n\n
"
);
fprintf
(
outfile
,
"extern int __wine_spec_exports[];
\n\n
"
);
...
@@ -891,28 +899,25 @@ void BuildDebugFile( FILE *outfile )
...
@@ -891,28 +899,25 @@ void BuildDebugFile( FILE *outfile )
prefix
,
prefix
);
prefix
,
prefix
);
#if defined(__i386__)
#if defined(__i386__)
fprintf
(
outfile
,
"asm(
\"\\
t.section
\
t
.init
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"asm(
\"\\
t.section
\
\
t
\\\"
.init
\\\"
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tcall "
PREFIX
"__wine_dbg_%s_init
\\
n
\"\n
"
,
prefix
);
fprintf
(
outfile
,
"
\"\\
tcall "
PREFIX
"__wine_dbg_%s_init
\\
n
\"\n
"
,
prefix
);
fprintf
(
outfile
,
"
\"\\
t.previous
\\
n
\"
);
\n
"
);
fprintf
(
outfile
,
"
\"\\
t.section
\\
t
\\\"
.fini
\\\"
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"asm(
\"\\
t.section
\t
.fini ,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tcall "
PREFIX
"__wine_dbg_%s_fini
\\
n
\"\n
"
,
prefix
);
fprintf
(
outfile
,
"
\"\\
tcall "
PREFIX
"__wine_dbg_%s_fini
\\
n
\"\n
"
,
prefix
);
fprintf
(
outfile
,
"
\"\\
t.
previous
\\
n
\"
);
\n
"
);
fprintf
(
outfile
,
"
\"\\
t.
section
\\
t
\\\"
.text
\\\"
\\
n
\"
);
\n
"
);
#elif defined(__sparc__)
#elif defined(__sparc__)
fprintf
(
outfile
,
"asm(
\"\\
t.section
\
t
.init
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"asm(
\"\\
t.section
\
\
t
\\\"
.init
\\\"
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tcall "
PREFIX
"__wine_dbg_%s_init
\\
n
\"\n
"
,
prefix
);
fprintf
(
outfile
,
"
\"\\
tcall "
PREFIX
"__wine_dbg_%s_init
\\
n
\"\n
"
,
prefix
);
fprintf
(
outfile
,
"
\"\\
tnop
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tnop
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
t.previous
\\
n
\"
);
\n
"
);
fprintf
(
outfile
,
"
\"\\
t.section
\\
t
\\\"
.fini
\\\"
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"asm(
\"\\
t.section
\t
.fini ,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tcall "
PREFIX
"__wine_dbg_%s_fini
\\
n
\"\n
"
,
prefix
);
fprintf
(
outfile
,
"
\"\\
tcall "
PREFIX
"__wine_dbg_%s_fini
\\
n
\"\n
"
,
prefix
);
fprintf
(
outfile
,
"
\"\\
tnop
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tnop
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
t.
previous
\\
n
\"
);
\n
"
);
fprintf
(
outfile
,
"
\"\\
t.
section
\t\\\"
.text
\\\"
\\
n
\"
);
\n
"
);
#elif defined(__PPC__)
#elif defined(__PPC__)
fprintf
(
outfile
,
"asm(
\"\\
t.section
\
t
.init
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"asm(
\"\\
t.section
\
\
t
\\\"
.init
\\\"
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tbl "
PREFIX
"__wine_dbg_%s_init
\\
n
\"\n
"
,
prefix
);
fprintf
(
outfile
,
"
\"\\
tbl "
PREFIX
"__wine_dbg_%s_init
\\
n
\"\n
"
,
prefix
);
fprintf
(
outfile
,
"
\"\\
t.previous
\\
n
\"
);
\n
"
);
fprintf
(
outfile
,
"
\"\\
t.section
\\
t
\\\"
.fini
\\\"
,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"asm(
\"\\
t.section
\t
.fini ,
\\\"
ax
\\\"\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tbl "
PREFIX
"__wine_dbg_%s_fini
\\
n
\"\n
"
,
prefix
);
fprintf
(
outfile
,
"
\"\\
tbl "
PREFIX
"__wine_dbg_%s_fini
\\
n
\"\n
"
,
prefix
);
fprintf
(
outfile
,
"
\"\\
t.
previous
\\
n
\"
);
\n
"
);
fprintf
(
outfile
,
"
\"\\
t.
section
\\
t
\\\"
.text
\\\"
\\
n
\"
);
\n
"
);
#else
#else
#error You need to define the DLL constructor for your architecture
#error You need to define the DLL constructor for your architecture
#endif
#endif
...
...
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