Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
katahiromz committed Jan 30, 2020
1 parent 9907838 commit 6f70b63
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 58 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# smalldll --- The Small DLL File

- `smalldll.dll` --- 1.50 KB (1,536 bytes).
- `smalldll64.dll` --- 1.50 KB (1,536 bytes).
- `smalldll.dll` --- 1.00 KB (1,024 bytes).
- `smalldll64.dll` --- 1.00 KB (1,024 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 /DEF:smalldll.def smalldll.obj
link /machine:X86 /SUBSYSTEM:WINDOWS /DLL /merge:.rdata=.text /DEF:smalldll.def 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 /DEF:smalldll64.def smalldll64.obj
link /machine:X64 /SUBSYSTEM:WINDOWS /DLL /merge:.rdata=.text /DEF:smalldll64.def 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
5E32DB4C time date stamp Thu Jan 30 22:34:04 2020
5E32DD7F time date stamp Thu Jan 30 22:43:27 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
5E32DB5B time date stamp Thu Jan 30 22:34:19 2020
5E32DDA9 time date stamp Thu Jan 30 22:44:09 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.
37 changes: 11 additions & 26 deletions smalldll.dll.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ File Type: DLL

FILE HEADER VALUES
14C machine (x86)
2 number of sections
5E32DB4B time date stamp Thu Jan 30 22:34:03 2020
1 number of sections
5E32DD7E time date stamp Thu Jan 30 22:43:26 2020
0 file pointer to symbol table
0 number of symbols
E0 size of optional header
Expand All @@ -24,20 +24,20 @@ OPTIONAL HEADER VALUES
10B magic # (PE32)
9.00 linker version
200 size of code
200 size of initialized data
0 size of initialized data
0 size of uninitialized data
1000 entry point (10001000)
1000 base of code
2000 base of data
10000000 image base (10000000 to 10002FFF)
10000000 image base (10000000 to 10001FFF)
1000 section alignment
200 file alignment
5.00 operating system version
0.00 image version
5.00 subsystem version
0 Win32 version
3000 size of image
400 size of headers
2000 size of image
200 size of headers
0 checksum
2 subsystem (Windows GUI)
0 DLL characteristics
Expand All @@ -47,7 +47,7 @@ OPTIONAL HEADER VALUES
1000 size of heap commit
0 loader flags
10 number of directories
2000 [ 35] RVA [size] of Export Directory
1010 [ 35] RVA [size] of Export Directory
0 [ 0] RVA [size] of Import Directory
0 [ 0] RVA [size] of Resource Directory
0 [ 0] RVA [size] of Exception Directory
Expand All @@ -67,10 +67,10 @@ OPTIONAL HEADER VALUES

SECTION HEADER #1
.text name
C virtual size
1000 virtual address (10001000 to 1000100B)
45 virtual size
1000 virtual address (10001000 to 10001044)
200 size of raw data
400 file pointer to raw data (00000400 to 000005FF)
200 file pointer to raw data (00000200 to 000003FF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
Expand All @@ -79,24 +79,10 @@ SECTION HEADER #1
Code
Execute Read

SECTION HEADER #2
.rdata name
35 virtual size
2000 virtual address (10002000 to 10002034)
200 size of raw data
600 file pointer to raw data (00000600 to 000007FF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
40000040 flags
Initialized Data
Read Only

Section contains the following exports for smalldll.dll

00000000 characteristics
5E32DB4B time date stamp Thu Jan 30 22:34:03 2020
5E32DD7E time date stamp Thu Jan 30 22:43:26 2020
0.00 version
1 ordinal base
0 number of functions
Expand All @@ -107,5 +93,4 @@ SECTION HEADER #2

Summary

1000 .rdata
1000 .text
Binary file modified smalldll64.dll
Binary file not shown.
37 changes: 11 additions & 26 deletions smalldll64.dll.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ File Type: DLL

FILE HEADER VALUES
8664 machine (x64)
2 number of sections
5E32DB5B time date stamp Thu Jan 30 22:34:19 2020
1 number of sections
5E32DDA8 time date stamp Thu Jan 30 22:44:08 2020
0 file pointer to symbol table
0 number of symbols
F0 size of optional header
Expand All @@ -24,19 +24,19 @@ OPTIONAL HEADER VALUES
20B magic # (PE32+)
11.00 linker version
200 size of code
200 size of initialized data
0 size of initialized data
0 size of uninitialized data
1000 entry point (0000000180001000)
1000 base of code
180000000 image base (0000000180000000 to 0000000180002FFF)
180000000 image base (0000000180000000 to 0000000180001FFF)
1000 section alignment
200 file alignment
6.00 operating system version
0.00 image version
6.00 subsystem version
0 Win32 version
3000 size of image
400 size of headers
2000 size of image
200 size of headers
0 checksum
2 subsystem (Windows GUI)
160 DLL characteristics
Expand All @@ -49,7 +49,7 @@ OPTIONAL HEADER VALUES
1000 size of heap commit
0 loader flags
10 number of directories
2000 [ 37] RVA [size] of Export Directory
1010 [ 37] RVA [size] of Export Directory
0 [ 0] RVA [size] of Import Directory
0 [ 0] RVA [size] of Resource Directory
0 [ 0] RVA [size] of Exception Directory
Expand All @@ -69,10 +69,10 @@ OPTIONAL HEADER VALUES

SECTION HEADER #1
.text name
D virtual size
1000 virtual address (0000000180001000 to 000000018000100C)
47 virtual size
1000 virtual address (0000000180001000 to 0000000180001046)
200 size of raw data
400 file pointer to raw data (00000400 to 000005FF)
200 file pointer to raw data (00000200 to 000003FF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
Expand All @@ -81,24 +81,10 @@ SECTION HEADER #1
Code
Execute Read

SECTION HEADER #2
.rdata name
37 virtual size
2000 virtual address (0000000180002000 to 0000000180002036)
200 size of raw data
600 file pointer to raw data (00000600 to 000007FF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
40000040 flags
Initialized Data
Read Only

Section contains the following exports for smalldll64.dll

00000000 characteristics
5E32DB5B time date stamp Thu Jan 30 22:34:19 2020
5E32DDA8 time date stamp Thu Jan 30 22:44:08 2020
0.00 version
1 ordinal base
0 number of functions
Expand All @@ -109,5 +95,4 @@ SECTION HEADER #2

Summary

1000 .rdata
1000 .text

0 comments on commit 6f70b63

Please sign in to comment.