[Mono-list] ilasm trouble

Morten Sylvest Olsen mortenolsen@mail.com
Tue, 19 Feb 2002 15:07:47 +0100 (CET)


I'm having some trouble with il code generation. (I use ilasm to generate
the PE files) Hope somebody could clarify a few things for me. I have been
looking at the generated code with ildasm.

I have this:

.class /*02000005*/ public auto ansi beforefieldinit ASTmake
       extends net.sf.pizzacompiler.compiler.ASTgen/* 02000004 */

Shouldn't the token representing the TypeRef for the parent class (ASTgen)
be of the 0x01 kind, whereas it is a 0x02 ie. a TypeDef?!?

The strange things is that is mostly seem to work, except for one class
which inherits from an abstract base class.

It shouldn't be necessary to make some kind of declarations when using
forward references in ilasm, should it?

Ilasm gives me this:

Resolving member refs: 12430 -> 11648 defs, 782 refs

What does this mean excactly?


And when verifying it I get:

[IL]: Error: [e:\pizza.exe : net.sf.pizzacompiler.compiler.ASTgen::at]
[token  0x0100002E]  [return sig] Unable to resolve token.
[IL]: Error: [e:\pizza.exe : net.sf.pizzacompiler.compiler.ASTgen::at]
[HRESULT 0x80004005] - Unspecified error
....

But the token _should_ be resolvable, it is defined in the assembly.


Another strange things is that when _not_ declaring the abstract class
(and the abstract methods in it) public, I get a metadata verifier error
(about zero RVA of privatescope method) but then these verifier errors
above disappear!

Hmm, I know its all a bit fuzzy, but I thought somebody might have a few
clues to what I could try.

- Morten

My haircut is totally traditional!
----------------------------------------------------------
email: morten@bergsoe.k-net.dk,c958496@student.dtu.dk
addresse: Bergsøe Kollegiet v. 1105 2850 Nærum
----------------------------------------------------------