Skip to content

Instantly share code, notes, and snippets.

@yukitos
Created August 9, 2016 08:50
Show Gist options
  • Save yukitos/2ca5977aaab26884bf64f95cff43ede3 to your computer and use it in GitHub Desktop.
Save yukitos/2ca5977aaab26884bf64f95cff43ede3 to your computer and use it in GitHub Desktop.
.assembly extern mscorlib { auto }
.assembly YDD { }
.module YDD.dll
.corflags 0x00000002
.vtfixup [1] int32 fromunmanaged at VT_01 // First v-table fixup
.vtfixup [1] int32 fromunmanaged at VT_02 // Second v-table fixup
.vtfixup [1] int32 fromunmanaged at VT_03 // Third v-table fixup
.data VT_01 = int32(0) // First v-table entry
.data VT_02 = int32(0) // Second v-table entry
.data VT_03 = int32(0) // Third v-table entry
.method public static void Yabba()
{
.vtentry 1:1
.export [1]
ldstr "Yabba"
call void [mscorlib]System.Console::WriteLine(string)
ret
}
.method public static void Dabba()
{
.vtentry 2:1
.export [2]
ldstr "Dabba"
call void [mscorlib]System.Console::WriteLine(string)
ret
}
.method public static void Doo()
{
.vtentry 3:1
.export [3]
ldstr "Doo!"
call void [mscorlib]System.Console::WriteLine(string)
ret
}
ilasm /dll ExportMethods.il /out:ExportMethods.dll
// Result of "dumpbin /exports ExportMethods.dll"
Microsoft (R) COFF/PE Dumper Version 14.00.23918.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file ExportMethods.dll
File Type: DLL
Section contains the following exports for ExportMethods.dll
00000000 characteristics
57A99911 time date stamp Tue Aug 9 17:49:21 2016
0.00 version
1 ordinal base
3 number of functions
3 number of names
ordinal hint RVA name
2 0 0000223E Dabba
3 1 0000224E Doo
1 2 0000222E Yabba
Summary
2000 .reloc
2000 .sdata
2000 .text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment