编程语言

img sharpbladepan

.Net Assembly初接触

发表于2004/10/10 23:11:00  1006人阅读

简单的一段代码:
//main.cs

using System;

class MyMainClass
{
    public static void Main()
    {
        Console.WriteLine("Main program!");
    }
}
编译成main.exe后用ildasm.exe反编译了一下,生成如下的manifest:
// Metadata version: v2.0.40607
.assembly extern mscorlib
{
  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )                         // .z/V.4..
  .ver 2:0:3600:0
}
.assembly main
{
  .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
  .hash algorithm 0x00008004
  .ver 0:0:0:0
}
.module main.exe
// MVID: {D8F028FF-4E4B-46B6-8E5C-A7245623C097}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003       // WINDOWS_CUI
.corflags 0x00000001    //  ILONLY
// Image base: 0x043B0000

红色部分的估计就是assembly manifest了。

阅读全文
0 0

相关文章推荐

img
取 消
img