diff options
author | yury <yury@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2019-02-25 13:35:40 +0000 |
---|---|---|
committer | yury <yury@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2019-02-25 13:35:40 +0000 |
commit | 1ce70abafeaaa9d2270a74beca651f29b035e11b (patch) | |
tree | b220955c8231e539b9b3993af016b3db06662eaf /compiler/nld.pas | |
parent | a7c24f025e126eb0f94db2bd71536308aa1d1c48 (diff) | |
download | fpc-1ce70abafeaaa9d2270a74beca651f29b035e11b.tar.gz |
* Do not set pi_needs_got in current_procinfo.flags at the node level, since the GOT usage can only be estimated there. Instead set the pi_needs_got flag at places where the GOT register is accessed during the code generation. This eliminates generation of the unneeded initialization of the GOT register and fixes linker errors when the _GLOBAL_OFFSET_TABLE_ symbol is referenced but no actual GOT references are present.
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@41460 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/nld.pas')
-rw-r--r-- | compiler/nld.pas | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/compiler/nld.pas b/compiler/nld.pas index 3549617e0b..65a82a13f1 100644 --- a/compiler/nld.pas +++ b/compiler/nld.pas @@ -400,9 +400,6 @@ implementation begin result:=nil; expectloc:=LOC_REFERENCE; - if (cs_create_pic in current_settings.moduleswitches) and - not(symtableentry.typ in [paravarsym,localvarsym]) then - include(current_procinfo.flags,pi_needs_got); case symtableentry.typ of absolutevarsym : @@ -424,9 +421,6 @@ implementation else if (tabstractvarsym(symtableentry).varspez=vs_const) then expectloc:=LOC_CREFERENCE; - if (target_info.system=system_powerpc_darwin) and - ([vo_is_dll_var,vo_is_external] * tabstractvarsym(symtableentry).varoptions <> []) then - include(current_procinfo.flags,pi_needs_got); { call to get address of threadvar } if (vo_is_thread_var in tabstractvarsym(symtableentry).varoptions) then begin @@ -1383,9 +1377,6 @@ implementation begin result:=nil; expectloc:=LOC_CREFERENCE; - if (cs_create_pic in current_settings.moduleswitches) and - (tf_pic_uses_got in target_info.flags) then - include(current_procinfo.flags,pi_needs_got); end; |