* MacOS Classic uses apparently very similiar mechanisms for the TOC as powerpc-aix

This commit is contained in:
florian 2025-01-03 17:36:34 +01:00
parent 8c28eb0935
commit f7264d3f29

View File

@ -297,6 +297,7 @@ unit cgppc;
function tcgppcgen.g_indirect_sym_load(list: TAsmList; const symname: string; const flags: tindsymflags): tregister; function tcgppcgen.g_indirect_sym_load(list: TAsmList; const symname: string; const flags: tindsymflags): tregister;
begin begin
case target_info.system of case target_info.system of
system_powerpc_macosclassic,
system_powerpc_aix, system_powerpc_aix,
system_powerpc64_aix: system_powerpc64_aix:
result:=load_got_symbol(list,symname,flags); result:=load_got_symbol(list,symname,flags);
@ -765,7 +766,7 @@ unit cgppc;
ref.base:=NR_RTOC; ref.base:=NR_RTOC;
ref.refaddr:=addr_pic; ref.refaddr:=addr_pic;
end end
else if target_info.system in systems_aix then else if target_info.system in systems_aix+[system_powerpc_macosclassic] then
get_aix_toc_sym(list,symbol,flags,ref,false) get_aix_toc_sym(list,symbol,flags,ref,false)
else else
internalerror(2007102010); internalerror(2007102010);
@ -1035,7 +1036,7 @@ unit cgppc;
{ if we have to create PIC, add the symbol to the TOC/GOT } { if we have to create PIC, add the symbol to the TOC/GOT }
if (((target_info.system = system_powerpc64_linux) and if (((target_info.system = system_powerpc64_linux) and
(cs_create_pic in current_settings.moduleswitches)) or (cs_create_pic in current_settings.moduleswitches)) or
(target_info.system in systems_aix)) and (target_info.system in systems_aix+[system_powerpc_macosclassic])) and
(assigned(ref.symbol) and (assigned(ref.symbol) and
not assigned(ref.relsymbol)) then not assigned(ref.relsymbol)) then
begin begin