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
c700f90e
Commit
c700f90e
authored
May 07, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use RaiseException instead of RtlRaiseException for delayed entry
points load failure to avoid creating a dependency on ntdll.
parent
90af05f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
30 deletions
+10
-30
import.c
tools/winebuild/import.c
+10
-30
No files found.
tools/winebuild/import.c
View file @
c700f90e
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "wine/exception.h"
#include "build.h"
#include "build.h"
struct
import
struct
import
...
@@ -533,10 +534,11 @@ static void add_extra_undef_symbols( const DLLSPEC *spec )
...
@@ -533,10 +534,11 @@ static void add_extra_undef_symbols( const DLLSPEC *spec )
{
{
kernel_imports
+=
add_extra_symbol
(
extras
,
&
count
,
"LoadLibraryA"
,
spec
);
kernel_imports
+=
add_extra_symbol
(
extras
,
&
count
,
"LoadLibraryA"
,
spec
);
kernel_imports
+=
add_extra_symbol
(
extras
,
&
count
,
"GetProcAddress"
,
spec
);
kernel_imports
+=
add_extra_symbol
(
extras
,
&
count
,
"GetProcAddress"
,
spec
);
kernel_imports
+=
add_extra_symbol
(
extras
,
&
count
,
"RaiseException"
,
spec
);
}
}
if
(
nb_regs
)
if
(
nb_regs
)
ntdll_imports
+=
add_extra_symbol
(
extras
,
&
count
,
"__wine_call_from_32_regs"
,
spec
);
ntdll_imports
+=
add_extra_symbol
(
extras
,
&
count
,
"__wine_call_from_32_regs"
,
spec
);
if
(
nb_
delayed
||
nb_
stubs
)
if
(
nb_stubs
)
ntdll_imports
+=
add_extra_symbol
(
extras
,
&
count
,
"RtlRaiseException"
,
spec
);
ntdll_imports
+=
add_extra_symbol
(
extras
,
&
count
,
"RtlRaiseException"
,
spec
);
/* make sure we import the dlls that contain these functions */
/* make sure we import the dlls that contain these functions */
...
@@ -902,21 +904,7 @@ static int output_delayed_imports( FILE *outfile, const DLLSPEC *spec )
...
@@ -902,21 +904,7 @@ static int output_delayed_imports( FILE *outfile, const DLLSPEC *spec )
}
}
fprintf
(
outfile
,
" }
\n
};
\n\n
"
);
fprintf
(
outfile
,
" }
\n
};
\n\n
"
);
/* check if there's some stub defined. if so, exception struct
fprintf
(
outfile
,
"extern void __stdcall RaiseException(unsigned int, unsigned int, unsigned int, const void *args[]);
\n
"
);
* is already defined, so don't emit it twice
*/
for
(
i
=
0
;
i
<
spec
->
nb_entry_points
;
i
++
)
if
(
spec
->
entry_points
[
i
].
type
==
TYPE_STUB
)
break
;
if
(
i
==
spec
->
nb_entry_points
)
{
fprintf
(
outfile
,
"struct exc_record {
\n
"
);
fprintf
(
outfile
,
" unsigned int code, flags;
\n
"
);
fprintf
(
outfile
,
" void *rec, *addr;
\n
"
);
fprintf
(
outfile
,
" unsigned int params;
\n
"
);
fprintf
(
outfile
,
" const void *info[15];
\n
"
);
fprintf
(
outfile
,
"};
\n\n
"
);
fprintf
(
outfile
,
"extern void __stdcall RtlRaiseException( struct exc_record * );
\n
"
);
}
fprintf
(
outfile
,
"extern void * __stdcall LoadLibraryA(const char*);
\n
"
);
fprintf
(
outfile
,
"extern void * __stdcall LoadLibraryA(const char*);
\n
"
);
fprintf
(
outfile
,
"extern void * __stdcall GetProcAddress(void *, const char*);
\n
"
);
fprintf
(
outfile
,
"extern void * __stdcall GetProcAddress(void *, const char*);
\n
"
);
fprintf
(
outfile
,
"
\n
"
);
fprintf
(
outfile
,
"
\n
"
);
...
@@ -934,20 +922,12 @@ static int output_delayed_imports( FILE *outfile, const DLLSPEC *spec )
...
@@ -934,20 +922,12 @@ static int output_delayed_imports( FILE *outfile, const DLLSPEC *spec )
fprintf
(
outfile
,
" /* patch IAT with final value */
\n
"
);
fprintf
(
outfile
,
" /* patch IAT with final value */
\n
"
);
fprintf
(
outfile
,
" return *pIAT = fn;
\n
"
);
fprintf
(
outfile
,
" return *pIAT = fn;
\n
"
);
fprintf
(
outfile
,
" else {
\n
"
);
fprintf
(
outfile
,
" else {
\n
"
);
fprintf
(
outfile
,
" struct exc_record rec;
\n
"
);
fprintf
(
outfile
,
" const void *args[2];
\n
"
);
fprintf
(
outfile
,
" rec.code = 0x80000100;
\n
"
);
fprintf
(
outfile
,
" args[0] = imd->szName;
\n
"
);
fprintf
(
outfile
,
" rec.flags = 1;
\n
"
);
fprintf
(
outfile
,
" args[1] = *pINT;
\n
"
);
fprintf
(
outfile
,
" rec.rec = 0;
\n
"
);
fprintf
(
outfile
,
" RaiseException( 0x%08x, %d, 2, args );
\n
"
,
fprintf
(
outfile
,
" rec.params = 2;
\n
"
);
EXCEPTION_WINE_STUB
,
EH_NONCONTINUABLE
);
fprintf
(
outfile
,
" rec.info[0] = imd->szName;
\n
"
);
fprintf
(
outfile
,
" return 0;
\n
"
);
fprintf
(
outfile
,
" rec.info[1] = *pINT;
\n
"
);
fprintf
(
outfile
,
"#ifdef __GNUC__
\n
"
);
fprintf
(
outfile
,
" rec.addr = __builtin_return_address(1);
\n
"
);
fprintf
(
outfile
,
"#else
\n
"
);
fprintf
(
outfile
,
" rec.addr = 0;
\n
"
);
fprintf
(
outfile
,
"#endif
\n
"
);
fprintf
(
outfile
,
" for (;;) RtlRaiseException( &rec );
\n
"
);
fprintf
(
outfile
,
" return 0; /* shouldn't go here */
\n
"
);
fprintf
(
outfile
,
" }
\n
}
\n\n
"
);
fprintf
(
outfile
,
" }
\n
}
\n\n
"
);
fprintf
(
outfile
,
"#ifndef __GNUC__
\n
"
);
fprintf
(
outfile
,
"#ifndef __GNUC__
\n
"
);
...
...
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