mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 09:19:45 +02:00
* only generate a big obj COFF file if the high bound of the sections is larger than $7fff (it could be that the final count is smaller again as sections that have the same name are combined)
git-svn-id: trunk@35409 -
This commit is contained in:
parent
c6bfb0064f
commit
ca11a4baaa
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user