LoongArch: Always emit la.got for global symbol

This commit is contained in:
Jinyang He 2025-01-15 10:59:34 +08:00
parent 8032b65442
commit d1c3ba96f2

View File

@ -1517,10 +1517,7 @@ implementation
if assigned(ref.symbol) then
begin
tmpreg:=getintregister(list,OS_INT);
if ((cs_create_pic in current_settings.moduleswitches) and
(ref.symbol.bind in [AB_LOCAL,AB_TEMP])) or
((not(cs_create_pic in current_settings.moduleswitches)) and
(ref.symbol.bind in [AB_LOCAL,AB_GLOBAL,AB_TEMP])) then
if (ref.symbol.bind in [AB_LOCAL,AB_TEMP]) then
begin
{ Load symbol address as local. }
reference_reset_symbol(href,ref.symbol,ref.offset,ref.alignment,ref.volatility);