Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MonoMod Detours fail due to LinuxSystem not supporting ARM #174

Open
BlueCyro opened this issue Mar 15, 2024 · 3 comments
Open

MonoMod Detours fail due to LinuxSystem not supporting ARM #174

BlueCyro opened this issue Mar 15, 2024 · 3 comments
Labels

Comments

@BlueCyro
Copy link

BlueCyro commented Mar 15, 2024

Description

Hiya, I'm attempting to use pardeike harmony (which in-turn uses MonoMod) to patch a game's headless server. I'm running this under .NET 8 (specifically CLR 8.0.3) on an ARM platform (Oracle's Ampere A1 free tier to be exact) and it appears detours fail to be created. I've tracked it down to the constructor for MonoMod.Core.Platforms.Systems.LinuxSystem. Given there's an 'if' statement in there which specifically checks if the platform is x86_64 and then throws a NotImplementedException, I get that this is probably just not supported yet. I wanted to report this issue anyways since it's still undesired (if understandable) behavior.

What would need to be done in order for MonoMod to work on ARM under .NET 8?

Example

This can very easily be reproduced with the following:

public static void Main(string[] args)
{
    DetourFactory.Current.CreateDetour(((Delegate)Test).Method, ((Delegate)OtherTest).Method); // Fails with "NotImplementedException" on ARM
    Test();
}


public static void Test()
{
    Console.WriteLine("Test has been called");
}

public static void OtherTest()
{
    Console.WriteLine("Other test has been called");
}
@BlueCyro BlueCyro added the bug label Mar 15, 2024
@Windows10CE
Copy link
Contributor

Windows10CE commented Mar 15, 2024

This comment explains everything needed to add a new architecture

@hakusaro
Copy link

Note that there are a number of people who will happily sponsor work to bring MonoMod to Apple Silicon and arm64 in the Apple Silicon thread, including with free development hardware: #90 (comment).

@AqlaSolutions
Copy link

We need it for MacOS ARM too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants