Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

In ilasm/tests:

	* test-module.il: New. Test for a netmodule.

In ilasm/codegen:

	* CodeGen.cs (CodeGen.ctor): Remove 'is_assembly' param.
	(CodeGen.Write): Emit assembly manifest only if the source
	had it.

In ilasm:

	* Driver.cs (DriverMain.Run): Update use of CodeGen.ctor .

In class/PEAPI:

	* PEAPI.cs (PEFile.WritePEFile): ReserveStrongNameSignatureSpace only if
	we have assembly manifest.

svn path=/branches/mono-1-1-13/mcs/; revision=59797
  • Loading branch information...
commit 7f04a3171fea1718d01307432d5a6faff3b58dae 1 parent 6a795f3
@radical radical authored
View
5 mcs/class/PEAPI/ChangeLog
@@ -1,3 +1,8 @@
+2006-04-24 Ankit Jain <jankit@novell.com>
+
+ * PEAPI.cs (PEFile.WritePEFile): ReserveStrongNameSignatureSpace only if
+ we have assembly manifest.
+
2006-02-22 Ankit Jain <jankit@novell.com>
* Metadata.cs (TypeAttr): Add [Flags] attribute.
View
3  mcs/class/PEAPI/PEAPI.cs
@@ -972,7 +972,8 @@ public ManifestResource GetResource (string name)
/// Write out the PEFile (the "bake" function)
/// </summary>
public void WritePEFile() { /* the "bake" function */
- fileImage.ReserveStrongNameSignatureSpace = thisAssembly.HasPublicKey;
+ if (thisAssembly != null)
+ fileImage.ReserveStrongNameSignatureSpace = thisAssembly.HasPublicKey;
fileImage.MakeFile();
}
View
4 mcs/ilasm/ChangeLog
@@ -1,3 +1,7 @@
+2006-04-24 Ankit Jain <jankit@novell.com>
+
+ * Driver.cs (DriverMain.Run): Update use of CodeGen.ctor .
+
2006-02-20 Ankit Jain <jankit@novell.com>
* Report.cs (Report): Make all methods,fields static.
View
2  mcs/ilasm/Driver.cs
@@ -66,7 +66,7 @@ public bool Run ()
if (output_file == null)
output_file = CreateOutputFilename ();
try {
- codegen = new CodeGen (output_file, target == Target.Dll, true, debugging_info);
+ codegen = new CodeGen (output_file, target == Target.Dll, debugging_info);
foreach (string file_path in il_file_list)
ProcessFile (file_path);
if (scan_only)
View
6 mcs/ilasm/codegen/ChangeLog
@@ -1,3 +1,9 @@
+2006-04-24 Ankit Jain <jankit@novell.com>
+
+ * CodeGen.cs (CodeGen.ctor): Remove 'is_assembly' param.
+ (CodeGen.Write): Emit assembly manifest only if the source
+ had it.
+
2006-02-22 Ankit Jain <jankit@novell.com>
* ExternTable.cs (ExternTable.GetTypeRef): Emit a warning if mscorlib is
View
16 mcs/ilasm/codegen/CodeGen.cs
@@ -68,17 +68,14 @@ public class CodeGen {
private string output_file;
private string debug_file;
private bool is_dll;
- private bool is_assembly;
private bool entry_point;
private Module this_module;
- public CodeGen (string output_file, bool is_dll, bool is_assembly,
- bool debugging_info)
+ public CodeGen (string output_file, bool is_dll, bool debugging_info)
{
this.output_file = output_file;
this.is_dll = is_dll;
- this.is_assembly = is_assembly;
if (debugging_info)
symwriter = new SymbolWriter (CreateDebugFile (output_file));
@@ -492,7 +489,7 @@ public void Write ()
this_module = new Module (Path.GetFileName (output_file));
out_stream = new FileStream (output_file, FileMode.Create, FileAccess.Write);
- pefile = new PEFile (assembly_name, ThisModule.Name, is_dll, is_assembly, null, out_stream);
+ pefile = new PEFile (assembly_name, ThisModule.Name, is_dll, assembly_name != null, null, out_stream);
PEAPI.Assembly asmb = pefile.GetThisAssembly ();
ThisModule.PeapiModule = pefile.GetThisModule ();
@@ -537,10 +534,11 @@ public void Write ()
if (stack_reserve != -1)
pefile.SetStackReserve (stack_reserve);
- asmb.AddAssemblyInfo(assembly_major_version,
- assembly_minor_version, assembly_build_version,
- assembly_revision_version, assembly_public_key,
- (uint) assembly_hash_algorithm, assembly_locale);
+ if (asmb != null)
+ asmb.AddAssemblyInfo(assembly_major_version,
+ assembly_minor_version, assembly_build_version,
+ assembly_revision_version, assembly_public_key,
+ (uint) assembly_hash_algorithm, assembly_locale);
pefile.WritePEFile ();
View
4 mcs/ilasm/tests/ChangeLog
@@ -1,3 +1,7 @@
+2006-04-24 Ankit Jain <jankit@novell.com>
+
+ * test-module.il: New. Test for a netmodule.
+
2006-02-22 Ankit Jain <jankit@novell.com>
* test-nonsealed-valueclass.il: New. Value class should be sealed.
View
40 mcs/ilasm/tests/test-module.il
@@ -0,0 +1,40 @@
+//Test for module, there is no Assembly manifest in
+//this source file
+
+.assembly extern mscorlib
+{
+ .ver 2:0:0:0
+ .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
+}
+.module a.netmodule // GUID = {CFF03797-0272-4E67-86D4-8C7263E398A4}
+
+
+ .class public auto ansi beforefieldinit A
+ extends [mscorlib]System.Object
+ {
+
+ // method line 1
+ .method public static hidebysig
+ default void foo () cil managed
+ {
+ // Method begins at RVA 0x2050
+ // Code size 2 (0x2)
+ .maxstack 8
+ IL_0000: nop
+ IL_0001: ret
+ } // end of method A::default void foo ()
+
+ // method line 2
+ .method public hidebysig specialname rtspecialname
+ instance default void .ctor () cil managed
+ {
+ // Method begins at RVA 0x2053
+ // Code size 7 (0x7)
+ .maxstack 8
+ IL_0000: ldarg.0
+ IL_0001: call instance void object::.ctor()
+ IL_0006: ret
+ } // end of method A::instance default void .ctor ()
+
+ } // end of class A
+
Please sign in to comment.
Something went wrong with that request. Please try again.