Skip to content

Commit

Permalink
Modify DOS stub (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
katahiromz committed Jan 30, 2020
1 parent e897ba0 commit 226f824
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 23 deletions.
Binary file added DOSSTUB1.EXE
Binary file not shown.
Binary file added DOSSTUB2.EXE
Binary file not shown.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# smalldll --- The Empty Smallest DLL File

- `smalldll.dll` --- 496 bytes.
- `smalldll64.dll` --- 512 bytes.
- `smalldll.dll` --- 432 bytes.
- `smalldll64.dll` --- 448 bytes.
2 changes: 1 addition & 1 deletion build32.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ rem NOTE: You needs 32-bit Visual Studio Command Prompt.
if exist smalldll.obj del smalldll.obj
if exist smalldll.dll del smalldll.dll
ml /c /Fosmalldll.obj smalldll.asm
link /machine:X86 /SUBSYSTEM:WINDOWS /DLL /merge:.rdata=.text /ALIGN:16 smalldll.obj
link /machine:X86 /SUBSYSTEM:WINDOWS /DLL /merge:.rdata=.text /ALIGN:16 /STUB:DOSSTUB2.EXE smalldll.obj
dumpbin /imports /exports /headers smalldll.dll > smalldll.dll.txt

if exist loadtest.exe del loadtest.exe
Expand Down
2 changes: 1 addition & 1 deletion build64.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ rem NOTE: You needs 64-bit Visual Studio Command Prompt.
if exist smalldll64.obj del smalldll64.obj
if exist smalldll64.dll del smalldll64.dll
ml64 /c /Fosmalldll64.obj smalldll64.asm
link /machine:X64 /SUBSYSTEM:WINDOWS /DLL /merge:.rdata=.text /ALIGN:16 smalldll64.obj
link /machine:X64 /SUBSYSTEM:WINDOWS /DLL /merge:.rdata=.text /ALIGN:16 /STUB:DOSSTUB2.EXE smalldll64.obj
dumpbin /imports /exports /headers smalldll64.dll > smalldll64.dll.txt

if exist loadtest64.exe del loadtest64.exe
Expand Down
Binary file modified loadtest.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion loadtest.exe.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ File Type: EXECUTABLE IMAGE
FILE HEADER VALUES
14C machine (x86)
3 number of sections
5E33528C time date stamp Fri Jan 31 07:02:52 2020
5E335ACE time date stamp Fri Jan 31 07:38:06 2020
0 file pointer to symbol table
0 number of symbols
E0 size of optional header
Expand Down
Binary file modified loadtest64.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion loadtest64.exe.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ File Type: EXECUTABLE IMAGE
FILE HEADER VALUES
8664 machine (x64)
5 number of sections
5E33529F time date stamp Fri Jan 31 07:03:11 2020
5E335AF4 time date stamp Fri Jan 31 07:38:44 2020
0 file pointer to symbol table
0 number of symbols
F0 size of optional header
Expand Down
Binary file modified smalldll.dll
Binary file not shown.
18 changes: 9 additions & 9 deletions smalldll.dll.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ File Type: DLL
FILE HEADER VALUES
14C machine (x86)
1 number of sections
5E33528B time date stamp Fri Jan 31 07:02:51 2020
5E335ACE time date stamp Fri Jan 31 07:38:06 2020
0 file pointer to symbol table
0 number of symbols
E0 size of optional header
Expand All @@ -26,18 +26,18 @@ OPTIONAL HEADER VALUES
10 size of code
0 size of initialized data
0 size of uninitialized data
1E0 entry point (100001E0)
1E0 base of code
1F0 base of data
10000000 image base (10000000 to 100001EF)
1A0 entry point (100001A0)
1A0 base of code
1B0 base of data
10000000 image base (10000000 to 100001AF)
10 section alignment
10 file alignment
5.00 operating system version
0.00 image version
5.00 subsystem version
0 Win32 version
1F0 size of image
1E0 size of headers
1B0 size of image
1A0 size of headers
0 checksum
2 subsystem (Windows GUI)
0 DLL characteristics
Expand Down Expand Up @@ -68,9 +68,9 @@ OPTIONAL HEADER VALUES
SECTION HEADER #1
.text name
C virtual size
1E0 virtual address (100001E0 to 100001EB)
1A0 virtual address (100001A0 to 100001AB)
10 size of raw data
1E0 file pointer to raw data (000001E0 to 000001EF)
1A0 file pointer to raw data (000001A0 to 000001AF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
Expand Down
Binary file modified smalldll64.dll
Binary file not shown.
16 changes: 8 additions & 8 deletions smalldll64.dll.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ File Type: DLL
FILE HEADER VALUES
8664 machine (x64)
1 number of sections
5E33529D time date stamp Fri Jan 31 07:03:09 2020
5E335AF4 time date stamp Fri Jan 31 07:38:44 2020
0 file pointer to symbol table
0 number of symbols
F0 size of optional header
Expand All @@ -26,17 +26,17 @@ OPTIONAL HEADER VALUES
10 size of code
0 size of initialized data
0 size of uninitialized data
1F0 entry point (00000001800001F0)
1F0 base of code
180000000 image base (0000000180000000 to 00000001800001FF)
1B0 entry point (00000001800001B0)
1B0 base of code
180000000 image base (0000000180000000 to 00000001800001BF)
10 section alignment
10 file alignment
6.00 operating system version
0.00 image version
6.00 subsystem version
0 Win32 version
200 size of image
1F0 size of headers
1C0 size of image
1B0 size of headers
0 checksum
2 subsystem (Windows GUI)
160 DLL characteristics
Expand Down Expand Up @@ -70,9 +70,9 @@ OPTIONAL HEADER VALUES
SECTION HEADER #1
.text name
D virtual size
1F0 virtual address (00000001800001F0 to 00000001800001FC)
1B0 virtual address (00000001800001B0 to 00000001800001BC)
10 size of raw data
1F0 file pointer to raw data (000001F0 to 000001FF)
1B0 file pointer to raw data (000001B0 to 000001BF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
Expand Down

0 comments on commit 226f824

Please sign in to comment.