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
e6c12eeb
Commit
e6c12eeb
authored
Oct 11, 1998
by
Andreas Mohr
Committed by
Alexandre Julliard
Oct 11, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Yet another small self-loader fix.
parent
fe6dfb05
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
25 deletions
+26
-25
kernel.spec
if1632/kernel.spec
+1
-1
module.h
include/module.h
+1
-1
neexe.h
include/neexe.h
+1
-0
segment.c
loader/ne/segment.c
+23
-23
No files found.
if1632/kernel.spec
View file @
e6c12eeb
...
...
@@ -111,7 +111,7 @@ file krnl386.exe
107 pascal16 SetErrorMode(word) SetErrorMode16
108 pascal16 SwitchStackTo(word word word) SwitchStackTo
109 register SwitchStackBack() SwitchStackBack
110 pascal
16
PatchCodeHandle(word) PatchCodeHandle
110 pascal
PatchCodeHandle(word) PatchCodeHandle
111 pascal GlobalWire(word) GlobalWire16
112 pascal16 GlobalUnWire(word) GlobalUnWire16
113 equate __AHSHIFT 3
...
...
include/module.h
View file @
e6c12eeb
...
...
@@ -74,7 +74,7 @@ typedef struct
typedef
struct
{
WORD
version
;
/* Must be
0xA0
*/
WORD
version
;
/* Must be
"A0" (0x3041)
*/
WORD
reserved
;
FARPROC16
BootApp
;
/* startup procedure */
FARPROC16
LoadAppSeg
;
/* procedure to load a segment */
...
...
include/neexe.h
View file @
e6c12eeb
...
...
@@ -133,6 +133,7 @@ struct ne_segment_table_entry_s
#define NE_SEGFLAGS_EXECUTEONLY 0x0080
#define NE_SEGFLAGS_READONLY 0x0080
#define NE_SEGFLAGS_RELOC_DATA 0x0100
#define NE_SEGFLAGS_SELFLOAD 0x0800
#define NE_SEGFLAGS_DISCARDABLE 0x1000
/*
...
...
loader/ne/segment.c
View file @
e6c12eeb
...
...
@@ -69,17 +69,20 @@ BOOL32 NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
pSegTable
=
NE_SEG_TABLE
(
pModule
);
pSeg
=
pSegTable
+
segnum
-
1
;
pModuleTable
=
NE_MODULE_TABLE
(
pModule
);
if
(
pSeg
->
flags
&
NE_SEGFLAGS_LOADED
)
/* already loaded ? */
return
TRUE
;
if
(
!
pSeg
->
filepos
)
return
TRUE
;
/* No file image, just return */
pModuleTable
=
NE_MODULE_TABLE
(
pModule
);
fd
=
NE_OpenFile
(
pModule
);
TRACE
(
module
,
"Loading segment %d, hSeg=%04x, flags=%04x
\n
"
,
segnum
,
pSeg
->
hSeg
,
pSeg
->
flags
);
lseek
(
fd
,
pSeg
->
filepos
<<
pModule
->
alignment
,
SEEK_SET
);
if
(
pSeg
->
size
)
size
=
pSeg
->
size
;
else
if
(
pSeg
->
minsize
)
size
=
pSeg
->
minsize
;
else
size
=
0x10000
;
else
size
=
pSeg
->
minsize
?
pSeg
->
minsize
:
0x10000
;
mem
=
GlobalLock16
(
pSeg
->
hSeg
);
if
(
pModule
->
flags
&
NE_FFLAGS_SELFLOAD
&&
segnum
>
1
)
{
...
...
@@ -382,12 +385,12 @@ unknown:
BOOL32
NE_LoadAllSegments
(
NE_MODULE
*
pModule
)
{
int
i
;
SEGTABLEENTRY
*
pSegTable
=
(
SEGTABLEENTRY
*
)
NE_SEG_TABLE
(
pModule
);
if
(
pModule
->
flags
&
NE_FFLAGS_SELFLOAD
)
{
HFILE32
hf
;
/* Handle self loading modules */
SEGTABLEENTRY
*
pSegTable
=
(
SEGTABLEENTRY
*
)
NE_SEG_TABLE
(
pModule
);
SELFLOADHEADER
*
selfloadheader
;
STACK16FRAME
*
stack16Top
;
THDB
*
thdb
=
THREAD_Current
();
...
...
@@ -430,12 +433,8 @@ BOOL32 NE_LoadAllSegments( NE_MODULE *pModule )
pSegTable
[
pModule
->
dgroup
-
1
].
hSeg
=
saved_hSeg
;
thdb
->
cur_stack
=
oldstack
;
/* FIXME
commented out by Andreas Mohr;
some self-loading exe ("BLINKER") relies on non-primary segs not loaded.
contact me if you experience problems */
/*for (i = 2; i <= pModule->seg_count; i++)
if (!NE_LoadSegment( pModule, i )) return FALSE;*/
for
(
i
=
2
;
i
<=
pModule
->
seg_count
;
i
++
)
if
(
!
NE_LoadSegment
(
pModule
,
i
))
return
FALSE
;
}
else
{
...
...
@@ -447,6 +446,20 @@ BOOL32 NE_LoadAllSegments( NE_MODULE *pModule )
/***********************************************************************
* PatchCodeHandle
*
* Needed for self-loading modules.
*/
/* It does nothing */
DWORD
WINAPI
PatchCodeHandle
(
HANDLE16
hSel
)
{
FIXME
(
module
,
"(%04x): stub.
\n
"
,
hSel
);
return
(
DWORD
)
NULL
;
}
/***********************************************************************
* NE_FixupPrologs
*
* Fixup the exported functions prologs.
...
...
@@ -756,19 +769,6 @@ HINSTANCE16 NE_CreateInstance( NE_MODULE *pModule, HINSTANCE16 *prev,
/***********************************************************************
* PatchCodeHandle
*
* Needed for self-loading modules.
*/
/* It does nothing */
void
WINAPI
PatchCodeHandle
(
HANDLE16
hSel
)
{
FIXME
(
module
,
"(%04x): stub.
\n
"
,
hSel
);
}
/***********************************************************************
* NE_Ne2MemFlags
*
* This function translates NE segment flags to GlobalAlloc flags
...
...
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