mkbundle生成的二进制文件在ARMv7h上导致SIGSEGV,而在Mono中运行正常

时间:2016-01-06 19:43:06

标签: mono mkbundle archlinux-arm

我目前正在使用ARMv7h测试archlinux中的Mono。首先,我测试了这个简单的程序:

// test.cs
using System;

public class Test {
  public static void Main(string[] args) {
    Console.WriteLine("I'm working.");
  }
}

我使用Mono作为通过pacman安装的本机包,而不是交叉编译。运行时,它的行为符合预期:

mcs test.cs
mono test.exe
I'm working.

当我尝试使用mkbundle捆绑此程序集时,它会编译而没有任何错误:

mkbundle --deps test.exe -o test_standalone
OS is: Linux
Sources: 1 Auto-dependencies: True
   embedding: /home/minx/usb/cs/test.exe
   embedding: /usr/lib/mono/4.5/mscorlib.dll
Compiling:
as -o temp.o temp.s
cc -ggdb -o test_standalone -Wall temp.c `pkg-config --cflags --libs mono-2`  temp.o
Done

/ usb /是一个已安装的外置USB驱动器。以root身份调用mkbundle。当我尝试运行结果二进制文件时:

./test_standalone

Native stacktrace:

Debug info from gdb:

Got a SIGSEGV while executing native code. This usually indicates 
a fatal error in the mono runtime or one of the native libraries
used by your application.

并返回shell。二进制文件没有提供任何其他信息。我错过了这个特定建筑的旗帜吗?

0 个答案:

没有答案