From: <ac...@us...> - 2010-03-30 21:54:57
|
Revision: 24 http://clibinutils.svn.sourceforge.net/clibinutils/?rev=24&view=rev Author: aco Date: 2010-03-30 21:54:44 +0000 (Tue, 30 Mar 2010) Log Message: ----------- merge from trunk Modified Paths: -------------- mono-based-binutils/branches/aco-dev/ChangeLog mono-based-binutils/branches/aco-dev/INSTALL mono-based-binutils/branches/aco-dev/scripts/as.in mono-based-binutils/branches/aco-dev/tools/gcc4cli/ld/Driver.cs mono-based-binutils/branches/aco-dev/tools/gcc4cli/utils/CFile.cs mono-based-binutils/branches/aco-dev/tools/gcc4cli/utils/CObject.cs Property Changed: ---------------- mono-based-binutils/branches/aco-dev/ Property changes on: mono-based-binutils/branches/aco-dev ___________________________________________________________________ Modified: svn:mergeinfo - /mono-based-binutils/trunk:5-12 + /mono-based-binutils/trunk:5-23 Modified: mono-based-binutils/branches/aco-dev/ChangeLog =================================================================== --- mono-based-binutils/branches/aco-dev/ChangeLog 2010-03-30 21:26:37 UTC (rev 23) +++ mono-based-binutils/branches/aco-dev/ChangeLog 2010-03-30 21:54:44 UTC (rev 24) @@ -1,3 +1,16 @@ +2010-03-24 Thierry LAFAGE <thi...@in...> + + * tools/gcc4cli/utils/CObject.cs: remove code concerning Pnet ilasm. + * scripts/as.in: remove code concerning Pnet ilasm. + +2010-03-23 Thierry LAFAGE <thi...@in...> + + * tools/gcc4cli/ld/Driver.cs: add "--runtime <rtversion>" + command-line option to specify one of 1.0, 1.1 or 2.0 (default) + runtime version. + * tools/gcc4cli/utils/CFile.cs: use the specified runtime + version (2.0 by default). + 2010-03-22 Andrea C. Ornstein <and...@st...> * tools/gcc4cli/utils/CodeFixer.cs (FixReferences): optimize code stream, Modified: mono-based-binutils/branches/aco-dev/INSTALL =================================================================== --- mono-based-binutils/branches/aco-dev/INSTALL 2010-03-30 21:26:37 UTC (rev 23) +++ mono-based-binutils/branches/aco-dev/INSTALL 2010-03-30 21:54:44 UTC (rev 24) @@ -1,4 +1,3 @@ - First of all download from Mono subversion repository Mono.Cecil (http://anonsvn.mono-project.com/viewcvs/trunk/mcs/class/Mono.Cecil.tar.gz?view=tar) and uncompress it in the directory tools Modified: mono-based-binutils/branches/aco-dev/scripts/as.in =================================================================== --- mono-based-binutils/branches/aco-dev/scripts/as.in 2010-03-30 21:26:37 UTC (rev 23) +++ mono-based-binutils/branches/aco-dev/scripts/as.in 2010-03-30 21:54:44 UTC (rev 24) @@ -23,7 +23,7 @@ shift ;; -o) - PARAM="$PARAM $1$2"; + PARAM="$PARAM -output:$2"; shift shift ;; @@ -34,13 +34,7 @@ esac done -if test "x`$ILASM --version | grep Mono | wc -l`" = "x0"; then - #needed by Pnet ilasm - PARAM=`echo "--format dll $PARAM" | sed 's? -o? -o ?'`; -else - #needed by Mono ilasm - PARAM=`echo "-dll -quiet $PARAM" | sed 's? -o? -output:?'`; -fi +PARAM="-dll -quiet $PARAM" CMD="$ILASM $PARAM" if test -n "$VERBOSE"; then Modified: mono-based-binutils/branches/aco-dev/tools/gcc4cli/ld/Driver.cs =================================================================== --- mono-based-binutils/branches/aco-dev/tools/gcc4cli/ld/Driver.cs 2010-03-30 21:26:37 UTC (rev 23) +++ mono-based-binutils/branches/aco-dev/tools/gcc4cli/ld/Driver.cs 2010-03-30 21:54:44 UTC (rev 24) @@ -49,6 +49,24 @@ set { multithreaded = value; } } + public string RTVersion { + set { + switch (value) { + case "1.0": + CFile.RT = TargetRuntime.NET_1_0; + break; + case "1.1": + CFile.RT = TargetRuntime.NET_1_1; + break; + case "2.0": + CFile.RT = TargetRuntime.NET_2_0; + break; + default: + throw new System.ArgumentException("Bad value for runtime version", "RTversion"); + } + } + } + Driver () { } @@ -112,6 +130,9 @@ case "-r": IncrementalLink = true; break; + case "--runtime": + RTVersion = (string) q.Dequeue (); + break; case "-v": Tracer.IncreaseVerbosity(); break; @@ -193,14 +214,15 @@ Console.WriteLine (prog_name); Console.WriteLine ("ld [options] <obj_files>"); - Console.WriteLine (" -o <filename> Specify the output file"); - Console.WriteLine (" -e | -exe output is an executable"); - Console.WriteLine (" -d | -dll | --shared output is a dll"); - Console.WriteLine (" -L <searchdir> search for Libraries also in searchdir"); - Console.WriteLine (" -l <libname> link with libname"); - Console.WriteLine (" -r Perform an incremental link"); - Console.WriteLine (" -v increase verbosity"); - Console.WriteLine (" -h this message"); + Console.WriteLine (" -o <filename> Specify the output file"); + Console.WriteLine (" -e | -exe output is an executable"); + Console.WriteLine (" -d | -dll | --shared output is a dll"); + Console.WriteLine (" -L <searchdir> search for Libraries also in searchdir"); + Console.WriteLine (" -l <libname> link with libname"); + Console.WriteLine (" -r Perform an incremental link"); + Console.WriteLine (" --runtime <rtversion> Use runtime version <rtversion>: 1.0, 1.1 or 2.0 (default)"); + Console.WriteLine (" -v increase verbosity"); + Console.WriteLine (" -h this message"); Console.WriteLine (""); Console.WriteLine (" Sample: ld -o a.out input.dll"); } Modified: mono-based-binutils/branches/aco-dev/tools/gcc4cli/utils/CFile.cs =================================================================== --- mono-based-binutils/branches/aco-dev/tools/gcc4cli/utils/CFile.cs 2010-03-30 21:26:37 UTC (rev 23) +++ mono-based-binutils/branches/aco-dev/tools/gcc4cli/utils/CFile.cs 2010-03-30 21:54:44 UTC (rev 24) @@ -12,6 +12,8 @@ public static readonly string ExternalAssemblyName = "ExternalAssembly"; public static readonly string ExternalTypeName = "ExternalAssembly"; + public static TargetRuntime RT = TargetRuntime.NET_2_0; + string name; AssemblyDefinition assembly; ModuleDefinition module; @@ -41,7 +43,7 @@ { Name = name; Assembly = AssemblyFactory.DefineAssembly (name, name, - TargetRuntime.NET_1_0, + RT, kind); Assembly.Resolver = asm_resolver; Modified: mono-based-binutils/branches/aco-dev/tools/gcc4cli/utils/CObject.cs =================================================================== --- mono-based-binutils/branches/aco-dev/tools/gcc4cli/utils/CObject.cs 2010-03-30 21:26:37 UTC (rev 23) +++ mono-based-binutils/branches/aco-dev/tools/gcc4cli/utils/CObject.cs 2010-03-30 21:54:44 UTC (rev 24) @@ -15,8 +15,6 @@ { MainType = Module.Types["<Module>"]; FillTables (); - if (ref_types.Contains ("<ModuleExtern>")) - fix_DOTGNU_Errors (); } internal CObject (string name, AssemblyResolver asm_resolver) @@ -30,30 +28,6 @@ Module.Types.Add (MainType); } - void fix_DOTGNU_Errors () - { - foreach (MethodDefinition method in MainType.Methods) { - foreach (Instruction instr in method.Body.Instructions) { - if ( instr.OpCode.OperandType == OperandType.InlineMethod - || (instr.OpCode.OperandType == OperandType.InlineTok && instr.Operand is MethodReference)) { - MethodReference mref = instr.Operand as MethodReference; - if (mref.DeclaringType.Name == "<ModuleExtern>") { - string m_name = mref.Name; - if (def_symbols.Contains (m_name)) { - mref.DeclaringType = ((MethodReference)def_symbols[m_name]).DeclaringType; - } - else if (private_symbols.Contains (m_name)) { - mref.DeclaringType = ((MethodReference)private_symbols[m_name]).DeclaringType; - } - else - throw new Exception ("Error in hack for DOTGNU"); - } - } - } - } - ref_types.Remove ("<ModuleExtern>"); - } - static int renamer_id = 0; bool MethodIsVarArg(MethodReference method) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |