@@ -753,7 +753,7 @@ let build_dll link_exe output_file files exts extra_args =
753753 List. iter (fun fn -> collect_file (find_file fn)) exts;
754754
755755 if main_pgm then add_def (usym " static_symtable" )
756- else (add_def (usym " reloctbl" ); add_def (usym " jmptbl" ));
756+ else (add_def (usym " reloctbl" ); if ! machine = `x64 then add_def (usym " jmptbl" ));
757757
758758 if ! machine = `x64 then add_def " __ImageBase"
759759 else add_def " ___ImageBase" ;
@@ -936,7 +936,8 @@ let build_dll link_exe output_file files exts extra_args =
936936 (usym (if main_pgm then " static_symtable" else " symtbl" ));
937937 if not main_pgm then begin
938938 add_master_reloc_table obj ! reloctbls (usym " reloctbl" );
939- add_master_jmp_table obj ! trampolines (usym " jmptbl" );
939+ if ! machine = `x64 then
940+ add_master_jmp_table obj ! trampolines (usym " jmptbl" );
940941 end ;
941942
942943 if ! errors then
@@ -1029,10 +1030,11 @@ let build_dll link_exe output_file files exts extra_args =
10291030 with the Windows 7 SDK in 64-bit mode. *)
10301031
10311032 Printf. sprintf
1032- " link /nologo %s%s%s%s%s /implib:%s /out:%s /subsystem:%s %s %s %s"
1033+ " link /nologo %s%s%s%s%s%s /implib:%s /out:%s /subsystem:%s %s %s %s"
10331034 (if ! verbose > = 2 then " /verbose " else " " )
10341035 (if link_exe = `EXE then " " else " /dll " )
1035- (if main_pgm then " " else " /export:symtbl /export:reloctbl /export:jmptbl " )
1036+ (if main_pgm then " " else " /export:symtbl /export:reloctbl " )
1037+ (if ! machine = `x86 then " " else " /export:jmptbl " )
10361038 (if main_pgm then " " else if ! noentry then " /noentry " else
10371039 let s =
10381040 match ! machine with
@@ -1052,7 +1054,9 @@ let build_dll link_exe output_file files exts extra_args =
10521054 if main_pgm then " "
10531055 else
10541056 let def_file, oc = open_temp_file " flexlink" " .def" in
1055- Printf. fprintf oc " EXPORTS\n reloctbl\n symtbl\n jmptbl\n " ;
1057+ Printf. fprintf oc " EXPORTS\n reloctbl\n symtbl\n " ;
1058+ if ! machine = `x64 then
1059+ Printf. fprintf oc " jmptbl\n " ;
10561060 close_out oc;
10571061 Filename. quote def_file
10581062 in
@@ -1078,7 +1082,9 @@ let build_dll link_exe output_file files exts extra_args =
10781082 if main_pgm then " "
10791083 else
10801084 let def_file, oc = open_temp_file " flexlink" " .def" in
1081- Printf. fprintf oc " EXPORTS\n reloctbl\n symtbl\n jmptbl\n " ;
1085+ Printf. fprintf oc " EXPORTS\n reloctbl\n symtbl\n " ;
1086+ if ! machine = `x64 then
1087+ Printf. fprintf oc " jmptbl\n " ;
10821088 close_out oc;
10831089 Filename. quote def_file
10841090 in
0 commit comments