Browse Source

labels need to be non-local for PIC code using GOT

git-svn-id: trunk@16108 -
pierre 15 years ago
parent
commit
1d2581b6d9
1 changed files with 3 additions and 0 deletions
  1. 3 0
      compiler/pdecl.pas

+ 3 - 0
compiler/pdecl.pas

@@ -284,6 +284,9 @@ implementation
                 else
                   labelsym:=tlabelsym.create(pattern);
                 symtablestack.top.insert(labelsym);
+                if (cs_create_pic in current_settings.moduleswitches) and
+                   (tf_pic_uses_got in target_info.flags) then
+                  labelsym.nonlocal:=true;
                 if m_iso in current_settings.modeswitches then
                   begin
                     if symtablestack.top.symtabletype=localsymtable then