[Mono-list] Question about Mono processor architecture reporting on ARM platforms

Alex J Lennon ajlennon at dynamicdevices.co.uk
Thu Jan 29 08:33:57 UTC 2015


Hi,

I'm trying to determine the processor architecture at runtime on an ARM
platform using the following code snippet, but it reports I386

class Program
    {
        static ImageFileMachine ProcessorArchitecture
        {
            get
            {

                PortableExecutableKinds peKind;
                ImageFileMachine machine;
                typeof(object).Module.GetPEKind(out peKind, out machine);
                return machine;
            }
        }

        static void Main()
        {
            Console.WriteLine("Processor Architecture is: " +
ProcessorArchitecture);
        }
    }

It is reporting I386 with the latest Mono 3.12.0 release on qemuarm, and
also with Mono 3.4.0 on ARM hardware (i.MX6-based)

I expected ImageFileMachine.ARM (0x01C4) but get I386

Can anybody advise if this is an implementational issue or if I'm doing
something wrong here?

Thanks,

Alex



More information about the Mono-list mailing list