Steward
分享是一種喜悅、更是一種幸福
程式語言 - Wine - 解決Error: unknown mnemonic jmp -- jmp 1f問題
問題如下:
tmp6ae48934/dlg-00000001.spec-00000001.s: Assembler messages: tmp6ae48934/dlg-00000001.spec-00000001.s:6: Error: unknown mnemonic `jmp' -- `jmp 1f' winebuild: /usr/bin/gcc failed with status 1 winegcc: /opt/wine_arm64/bin/winebuild failed
解法如下:
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index ef6bd16267c..5352a7f118a 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -762,7 +762,11 @@ void output_module( DLLSPEC *spec )
break;
default:
output( "\n\t.section \".init\",\"ax\"\n" );
+#if defined(__aarch64__)
+ output( "\tb 1f\n" );
+#else
output( "\tjmp 1f\n" );
+#endif
output( "__wine_spec_pe_header:\n" );
output( "\t.skip %u\n", 65536 + page_size );
output( "1:\n" );