[m-rev.] IL strong name tokens changed?

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Nov 20 08:32:07 AEDT 2001


Apparently the algorithm for computing the public key tokens
for .NET components seems to have changed.  At any rate,
I needed to make the following change to get it to work,
despite not having changed library/library_strong_name.sn.
Oddly, ilasm and gacutil report different results for
the public key token.  The ones that ilasm reports are
the same as they were before, but those don't seem to work
anymore -- I guess gacutil and the loader must be using a
new algorithm now.

This is probably highly sensitive to exactly which version
of .NET you have, so I won't commit it now.

runtime/mercury_il.il:
compiler/mlds_to_il.il:
	Update the hard-coded value of the Mercury library's
	public key token to reflect its new value.

cvs server: Diffing .
Index: mercury_il.il
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_il.il,v
retrieving revision 1.11
diff -u -d -r1.11 mercury_il.il
--- mercury_il.il	2001/08/16 15:04:13	1.11
+++ mercury_il.il	2001/11/19 19:34:08
@@ -18,7 +18,11 @@
 	// The publickeytoken specifies the public key used to sign the
 	// mercury assembly.  You can retrieve this number using ildasm
 	// or gacutil, or the System.Reflection API.
-	.publickeytoken = ( 22 8C 16 7D 12 AA B B ) 
+	// XXX Unfortunately with Microsoft .NET Framework v1.0.3215
+	//     those tools give different answers!
+	//     ildasm says one thing and gacutil says another.
+	//     It seems that gacutil is correct.
+	.publickeytoken = ( 07 17 B3 FA 9C B6 11 06 ) 
 }
 
 .assembly extern 'mscorlib'{
cvs server: Diffing GETOPT
cvs server: Diffing machdeps
cvs server: Diffing .
Index: mlds_to_il.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds_to_il.m,v
retrieving revision 1.91
diff -u -d -r1.91 mlds_to_il.m
--- mlds_to_il.m	2001/11/08 11:48:01	1.91
+++ mlds_to_il.m	2001/11/19 19:33:51
@@ -3907,10 +3918,8 @@
 	AllDecls = [
 		extern_assembly("mercury", [
 			version(0, 0, 0, 0),
-			public_key_token([
-				int8(0x22), int8(0x8C), int8(0x16), int8(0x7D),
-				int8(0x12), int8(0xAA), int8(0x0B), int8(0x0B)
-			])
+			mercury_public_key_token
+
 		]),
 		extern_assembly("mscorlib", [
 			version(1, 0, 2411, 0),
@@ -3932,11 +3941,16 @@
 mercury_strong_name_assembly_decls
 	= [
 		version(0, 0, 0, 0),
-		public_key_token([
-			int8(0x22), int8(0x8C), int8(0x16), int8(0x7D),
-			int8(0x12), int8(0xAA), int8(0x0B), int8(0x0B)
-		])
+		mercury_public_key_token
 	].
+
+	% XXX This is also duplicated in runtime/mercury_il.il.
+:- func mercury_public_key_token = assembly_decl.
+mercury_public_key_token =
+	public_key_token([
+		int8(0x07), int8(0x17), int8(0xB3), int8(0xFA),
+		int8(0x9C), int8(0xB6), int8(0x11), int8(0x06)
+	]).
 
 %-----------------------------------------------------------------------------
 
cvs server: Diffing notes

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list