|
@@ -894,6 +894,19 @@ Implementation
|
|
|
|
|
|
|
|
|
function TExternalAssembler.MakeCmdLine: TCmdStr;
|
|
|
+
|
|
|
+ function section_high_bound:longint;
|
|
|
+ var
|
|
|
+ alt : tasmlisttype;
|
|
|
+ begin
|
|
|
+ result:=0;
|
|
|
+ for alt:=low(tasmlisttype) to high(tasmlisttype) do
|
|
|
+ result:=result+current_asmdata.asmlists[alt].section_count;
|
|
|
+ end;
|
|
|
+
|
|
|
+ const
|
|
|
+ min_big_obj_section_count = $7fff;
|
|
|
+
|
|
|
begin
|
|
|
result:=asminfo^.asmcmd;
|
|
|
{ for Xcode 7.x and later }
|
|
@@ -944,7 +957,8 @@ Implementation
|
|
|
{ as we don't keep track of the amount of sections we created we simply
|
|
|
enable Big Obj COFF files always for targets that need them }
|
|
|
if (cs_asm_pre_binutils_2_25 in current_settings.globalswitches) or
|
|
|
- not (target_info.system in systems_all_windows+systems_nativent-[system_i8086_win16]) then
|
|
|
+ not (target_info.system in systems_all_windows+systems_nativent-[system_i8086_win16]) or
|
|
|
+ (section_high_bound<min_big_obj_section_count) then
|
|
|
Replace(result,'$BIGOBJ','')
|
|
|
else
|
|
|
Replace(result,'$BIGOBJ','-mbig-obj');
|