Document --assembly-loader, change default to 'legacy' and fix comment
authorAndi McClure <andi.mcclure@xamarin.com>
Mon, 1 May 2017 20:11:43 +0000 (16:11 -0400)
committerAndi McClure <andi.mcclure@xamarin.com>
Wed, 3 May 2017 14:48:48 +0000 (10:48 -0400)
Also set testing_gac tests to use --assembly-loader=strict, since it is no longer the default

man/mono.1
mono/metadata/metadata.c
mono/tests/testing_gac/Makefile.am

index dcde246d47232f2f07ff2717742913fb99954a81..b23581535c583425416b8a9dc3fdf8ae78451a89 100644 (file)
@@ -311,6 +311,9 @@ Instructs the AOT compiler to emit (or not emit) debug symbol information.
 For more information about AOT, see: http://www.mono-project.com/docs/advanced/aot/
 .RE
 .TP
+\fB--aot-path=PATH\fR
+List of additional directories to search for AOT images.
+.TP
 \fB--apply-bindings=FILE\fR
 Apply the assembly bindings from the specified configuration file when running
 the AOT compiler.  This is useful when compiling an auxiliary assembly that is
@@ -321,6 +324,13 @@ app.exe.config available when compiling lib.dll ahead of time, use:
        mono --apply-bindings=app.exe.config --aot lib.dll
 .fi
 .TP
+\fB--assembly-loader=MODE\fR
+If mode is \fBstrict\fR, Mono will check that the public key token, culture and version
+of a candidate assembly matches the requested strong name.  If mode is \fBlegacy\fR, as
+long as the name matches, the candidate will be allowed. \fBstrict\fR is the behavior
+consistent with .NET Framework but may break some existing mono-based applications.
+The default is \fBlegacy\fR.
+.TP
 \fB--attach=[options]\fR
 Currently the only option supported by this command line argument is
 \fBdisable\fR which disables the attach functionality.
@@ -331,9 +341,6 @@ The default files are /etc/mono/config and ~/.mono/config or the file
 specified in the MONO_CONFIG environment variable, if set.  See the
 mono-config(5) man page for details on the format of this file.
 .TP
-\fB--aot-path=PATH\fR
-List of additional directories to search for AOT images.
-.TP
 \fB--debugger-agent=[options]\fR 
 This instructs the Mono runtime to
 start a debugging agent inside the Mono runtime and connect it to a
index 78dece0b24e910d5f458ca2842e47afe6d883305..dd1ea04a33edf386bbbe223a2b2c5ded843b5ce5 100644 (file)
@@ -520,11 +520,11 @@ mono_tables_names [] = {
 #endif
 
 /* If TRUE (but also see DISABLE_STICT_STRONG_NAMES #define), Mono will check
- * that the public key token and version of a candidate assembly matches the
- * requested strong name.  If FALSE, as long as the name matches, the candidate
+ * that the public key token, culture and version of a candidate assembly matches
+ * the requested strong name.  If FALSE, as long as the name matches, the candidate
  * will be allowed.
  */
-static gboolean check_strong_names_strictly = TRUE;
+static gboolean check_strong_names_strictly = FALSE;
 
 // Amount initially reserved in each imageset's mempool.
 // FIXME: This number is arbitrary, a more practical number should be found
index d65b359ce5d46194ebf72adb7eb5163027245362..1a4e30a68f3ed7cd3d522643eeb9c4ba993ad204 100644 (file)
@@ -23,7 +23,8 @@ RUNTIME= $(top_builddir)/runtime/mono-wrapper
 TEST_RUNTIME = MONO_PATH=$(CLASS) $(RUNTIME)
 TOOLS_RUNTIME= MONO_PATH=$(mcs_topdir)/class/lib/build $(RUNTIME)
 
-TEST_RUNNER = ../test-runner.exe --runtime $(RUNTIME)
+# These tests are testing strict assembly strong-name resolution
+TEST_RUNNER = ../test-runner.exe --runtime $(RUNTIME) --runtime-args "--assembly-loader=strict"
 
 if HOST_WIN32
 TEST_RUNNER_ARGS=--runtime $(if $(MONO_EXECUTABLE),$(shell cygpath -w -a $(MONO_EXECUTABLE) | sed 's/\\/\\\\/g'),mono)