[Mono-list] Problem using 0.24 aot - Please help
Vivek, Bharath Varma (IE10)
Vivek.Varma@honeywell.com
Sun, 18 May 2003 15:39:35 +0530
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------=_NextPartTM-000-dd886bcd-7d5e-4b87-a67a-18cd0175d2eb
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C31D25.952DD470"
------_=_NextPart_001_01C31D25.952DD470
Content-Type: text/plain
Hello there,
I'm facing few problems using the new aot compiler.
The problem is explained in detail below.....
Could you give me some pointers on how to solve the problem?
Thanks
Vivek
Doing mono --aot HelloWorld.exe, gave me the following.........
Mono AOT compiler - compiling assembly HelloWorld.exe
Executing the native assembler now:
as c:\WINNT\Profiles\vivekv\LOCALS~1\Temp/mono_aot_03456 -o
c:\WINNT\Profiles\vivekv\LOCALS~1\Temp/mono_aot_03456.o;ld -shared -o
HelloWorld.exe.so c:\WINNT\Profiles\vivekv\LOCALS~1\Temp/mono_aot_03456.o;rm
c:\WINNT\Profiles\vivekv\LOCALS~1\Temp/mono_aot_03456.o;strip
--strip-unneeded --discard-all HelloWorld.exe.so
as: unrecognized option `-shared'
Compile 2 out of 2 methods (100%)
0 methods contains exception tables (0%)
0 methods contains absolute addresses (0%)
0 methods contains wrapper references (0%)
0 methods contains lmf pointers (0%)
0 methods has other problems (0%)
AOT RESULT 0
So I did the following one by one!
as c:\WINNT\Profiles\vivekv\LOCALS~1\Temp/mono_aot_03456 -o
c:\WINNT\Profiles\vivekv\LOCALS~1\Temp/mono_aot_03456.o
ld -shared -o HelloWorld.exe.so
c:\WINNT\Profiles\vivekv\LOCALS~1\Temp/mono_aot_03456.o
Using the ld(GNU linker) as mentioned above gave me the following..........
Cannot export method_06000001: symbol not found
Cannot export method_06000001_patch_info: symbol not found
Cannot export method_06000002: symbol not found
Cannot export method_06000002_patch_info: symbol not found
Cannot export mono_assembly_guid: symbol not found
So I removed the -shared option and did
ld -o HelloWorld.exe.so
c:\WINNT\Profiles\vivekv\LOCALS~1\Temp/mono_aot_03456.o
Doing this gave me the HelloWorld.exe.so file and the following message
.......
ld: warning: cannot find entry symbol _mainCRTStartup; defaulting to
00401000
Now I used the following
strip --strip-unneeded --discard-all HelloWorld1.exe.so
Now I ran the HelloWorld.exe by saying
mono HelloWorld.exe
To make sure that the aot compiled code was being used, I debugged the
execution and found that it was not using the aot compiled code!
g_module_symbol was not able to find the GUID of my HelloWorld.exe assembly
in the HelloWorld.exe.so file! and because of this the "aot_module" field of
the MonoAssembly structure for my HelloWorld.exe was being set to NULL!
Which caused the "mono_aot_get_method" to return NULL! because of which the
code was getting JIT compiled all over again!
Few Questions.....
Why did I get the unrecognized option "-shared"?
Why did I get "cannot export method" errors when using the linker?
I created HelloWorld.exe.so without using the -shared option, so did my
HelloWorld.exe.so getting created properly?
Why is "g_module_symbol" not able to find the symbol which contains my
assembly's GUID?
Version Info
***********
mono version = 0.24
GNU assembler version = 2.12.90 20020706
GNU ld version = 2.12.90 20020706
GNU strip = 2.12.90 20020706
All running on Cygwin
------_=_NextPart_001_01C31D25.952DD470
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 10">
<meta name=3DOriginator content=3D"Microsoft Word 10">
<link rel=3DFile-List href=3D"cid:filelist.xml@01C31D54.105A0820">
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
name=3D"stockticker"/>
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:UseFELayout/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:\5B8B\4F53;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:SimSun;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
span.EmailStyle17
{mso-style-type:personal-compose;
mso-style-noshow:yes;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;
font-family:Arial;
mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial;
mso-bidi-font-family:Arial;
color:windowtext;
font-weight:normal;
font-style:normal;
text-decoration:none;
text-underline:none;
text-decoration:none;
text-line-through:none;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */=20
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]-->
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple =
style=3D'tab-interval:.5in'>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Hello there,<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>I'm facing few problems using the new <span =
class=3DSpellE>aot</span>
compiler.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>The problem is explained in detail =
below.....<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Could you give me some pointers on how to solve the =
problem?<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Thanks<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Vivek<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Doing mono --<span class=3DSpellE>aot</span> HelloWorld.exe, =
gave me the
following.........<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Mono AOT compiler - compiling assembly =
HelloWorld.exe<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Executing the native assembler =
now:<o:p></o:p></span></font></p>
<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
style=3D'font-size:12.0pt'>as</span></font></span>
c:\WINNT\Profiles\vivekv\LOCALS~1\Temp/mono_aot_03456 -o
c:\WINNT\Profiles\vivekv\LOCALS~1\Temp/mono_aot_03456.o;ld -shared -o =
<span
class=3DSpellE>HelloWorld.exe.so</span>
c:\WINNT\Profiles\vivekv\LOCALS~1\Temp/mono_aot_03456.o;rm
c:\WINNT\Profiles\vivekv\LOCALS~1\Temp/mono_aot_03456.o;strip =
--strip-unneeded
--discard-all <span =
class=3DSpellE>HelloWorld.exe.so</span><o:p></o:p></p>
<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
style=3D'font-size:12.0pt'>as</span></font></span>: unrecognized option =
`-shared'<o:p></o:p></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Compile 2 out of 2 methods (100%)<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>0 methods contains exception tables =
(0%)<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>0 methods contains absolute addresses =
(0%)<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>0 methods contains wrapper references =
(0%)<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>0 methods contains <span class=3DSpellE>lmf</span> pointers =
(0%)<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>0 methods has other problems (0%)<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>AOT RESULT 0<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>So I did the following one by one!<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
style=3D'font-size:12.0pt'>as</span></font></span>
c:\WINNT\Profiles\vivekv\LOCALS~1\Temp/mono_aot_03456 -o
c:\WINNT\Profiles\vivekv\LOCALS~1\Temp/mono_aot_03456.o<o:p></o:p></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
style=3D'font-size:12.0pt'>ld</span></font></span> -shared -o <span =
class=3DSpellE>HelloWorld.exe.so</span>
c:\WINNT\Profiles\vivekv\LOCALS~1\Temp/mono_aot_03456.o<o:p></o:p></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Using the <span class=3DGramE>ld(</span>GNU linker) as =
mentioned above gave
me the following..........<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Cannot export method_06000001: symbol not =
found<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Cannot export method_06000001_patch_info: symbol not =
found<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Cannot export method_06000002: symbol not =
found<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Cannot export method_06000002_patch_info: symbol not =
found<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Cannot export <span class=3DSpellE>mono_assembly_guid</span>: =
symbol not
found<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>So I removed the -shared option and did =
<o:p></o:p></span></font></p>
<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
style=3D'font-size:12.0pt'>ld</span></font></span> -o <span =
class=3DSpellE>HelloWorld.exe.so</span>
c:\WINNT\Profiles\vivekv\LOCALS~1\Temp/mono_aot_03456.o<o:p></o:p></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Doing this gave me the <span =
class=3DSpellE>HelloWorld.exe.so</span> file
and the following message .......<o:p></o:p></span></font></p>
<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
style=3D'font-size:12.0pt'>ld</span></font></span>: warning: cannot =
find entry
symbol _<span class=3DSpellE>mainCRTStartup</span>; defaulting to =
00401000<o:p></o:p></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Now I used the following<o:p></o:p></span></font></p>
<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
style=3D'font-size:12.0pt'>strip</span></font></span> --strip-unneeded
--discard-all HelloWorld1.exe.so<o:p></o:p></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Now I ran the HelloWorld.exe by =
saying<o:p></o:p></span></font></p>
<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
style=3D'font-size:12.0pt'>mono</span></font></span> =
HelloWorld.exe<o:p></o:p></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>To make sure that the <span class=3DSpellE>aot</span> compiled =
code was
being <span class=3DGramE>used,</span> I debugged the execution and =
found that it
was not using the <span class=3DSpellE>aot</span> compiled =
code!<o:p></o:p></span></font></p>
<p class=3DMsoNormal><span class=3DSpellE><span class=3DGramE><font =
size=3D3
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt'>g_module_symbol</span></font></span></span>
was not able to find the GUID of my HelloWorld.exe assembly in the =
<span
class=3DSpellE>HelloWorld.exe.so</span> file<font size=3D2><span =
style=3D'font-size:
10.0pt'>!</span></font> and because of this the "<span =
class=3DSpellE>aot_module</span>"
field of the <span class=3DSpellE>MonoAssembly</span> structure for my
HelloWorld.exe was being set to NULL! <span class=3DGramE>Which caused =
the "<span
class=3DSpellE>mono_aot_get_method</span>" to return NULL!</span> <span
class=3DGramE>because</span> of which the code was getting =
<st1:stockticker>JIT</st1:stockticker>
compiled all over again!<o:p></o:p></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Few Questions.....<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Why did I get the unrecognized option =
"-shared"?<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Why did I get "cannot export method" errors when using the
linker? <o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>I created <span class=3DSpellE>HelloWorld.exe.so</span> without =
using the
-shared option, so did my <span class=3DSpellE>HelloWorld.exe.so</span>
getting created properly?<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Why is "<span class=3DSpellE>g_module_symbol</span>" not able
to find the symbol which contains my assembly's =
GUID?<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>Version Info<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>***********<o:p></o:p></span></font></p>
<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
style=3D'font-size:12.0pt'>mono</span></font></span> version =3D =
0.24<o:p></o:p></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>GNU assembler version =3D 2.12.90 =
20020706<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>GNU <span class=3DGramE>ld</span> version =3D 2.12.90 =
20020706<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>GNU strip =3D 2.12.90 20020706<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>All running on <span =
class=3DSpellE>Cygwin</span><o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>
------_=_NextPart_001_01C31D25.952DD470--
------=_NextPartTM-000-dd886bcd-7d5e-4b87-a67a-18cd0175d2eb--