[Mono-dev] [PATCH] AssemblyLinker (AL) fixes

Gert Driesen gert.driesen at telenet.be
Sun Jan 14 15:44:54 EST 2007


Hi,

I've attached a patch for AssemblyLinker (al) which fixes several
issues, and improved compatibility with the MS AssemblyLinker.

* Al.cs: Use DelaySign enum to capture whether a delaysign (+ or -)
option was specified, and what value was set. This was necessary to
make a distinction between leaving the default value (possibly
obtained from a template assembly), and explicitly turned delay signing
off. Removed unused IsStrongName method. Added support for absolute
paths for modules on unix (borrowed from mcs). Previously absolute
paths where reportd as unrecognized command line options. Only add
AssemblyDelaySignAttribute, AssemblyKeyFileAttribute and
AssemblyKeyNameAttribute on 1.0 profile. Do not add an
AssemblyCultureAttribute if culture is specified, instead set the
culture on the AssemblyName. When template is not an absolute path,
then consider it to relative to the current directory. Removed unused
AddResource method. Do not require template to be strongly signed;
although MSDN states this, MS does not enforce this (and it should not).
Template option take a file name, not an assembly name. Fixed bug
#80440. When a template is set, use the keyfile specified in
AssemblyKeyFileAttribute of that template assembly to sign the 
assembly (unless overridden by /keyfile option). Same goes for
AssemblyDelaySignAttribute and AssemblyKeyNameAttribute. Fixes bug
#80472.

Besides the patch for AssemblyLinker, I've attached a gzipped tar
archive containing a full repro for the issues resolved in the patch.
Tested again Mono (1.0/2.0 profile), and MS .NET (1.1 and 2.0).

I had hoped to be able to provide a Makefile for it, but I had to resort
to a NAnt build file to "drive it". I couldn't find a way to have a
single makefile that works for both Mono and MS, and that allows you to
check exit codes of the tools used in the Makefile. I'm sure it can be
done, I'm just not good at it.

Also, you need the fix for bug #80513 to allow the NAnt build file to
verify whether AL's delay signing indeed works. I could attached the fix
for that bug to that bug report (it's a trivial fix).

Let me know if it's ok to commit.

Gert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: al.patch
Type: text/x-patch
Size: 21277 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070114/5a667e73/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tests.tar.gz
Type: application/x-compressed-tar
Size: 16820 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070114/5a667e73/attachment-0001.bin 


More information about the Mono-devel-list mailing list