MonoDevelop를 사용하여 "hello world"를 인쇄하는 간단한 모노 실행 파일을 만들었습니다. 나는 AOT의 'asmonly'옵션을 시험해보고 싶었다. 따라서 :Mono 'asmonly'옵션
[[email protected] Debug]# ls
abc.exe
[[email protected] Debug]# mono --aot=full,static,asmonly abc.exe
Mono Ahead of Time compiler - compiling assembly /home/alon/Projects/abc/abc/bin/Debug/abc.exe
Code: 1538 Info: 50 Ex Info: 114 Class Info: 30 PLT: 5 GOT Info: 105 GOT Info Offsets: 24 GOT: 60
Output file: '/home/alon/Projects/abc/abc/bin/Debug/abc.exe.s'.
Linking symbol: 'mono_aot_module_abc_info'.
Compiled 9 out of 9 methods (100%)
Methods without GOT slots: 1 (11%)
Direct calls: 0 (100%)
JIT time: 1 ms, Generation time: 0 ms, Assembly+Link time: 0 ms.
GOT slot distribution:
class: 1
image: 1
ldstr: 1
interruption_request_flag: 7
[[email protected] Debug]# ls
abc.exe abc.exe.s
[[email protected] Debug]# as -o hello_world.o abc.exe.s
[[email protected] Debug]# ls
abc.exe abc.exe.s hello_world.o
[[email protected] Debug]# ld -o hello_world.so hello_world.o
ld: warning: cannot find entry symbol _start; defaulting to 0000000008049000
[[email protected] Debug]# ls
abc.exe abc.exe.s hello_world.o hello_world.so
[[email protected] Debug]# ./hello_world.so
Segmentation fault (core dumped)
[[email protected] Debug]#
왜 분할 오류가 발생합니까? Fedora 12 x64를 사용하고 있습니다. 그리고 ld에서 "entry symbol _start를 찾을 수 없습니다"오류가 무엇입니까?
감사합니다!
물론 Main 함수가 정의되어 있습니다. 모든 예, 그것은 AOT를 사용하지 않을 때 작동합니다. –