瀏覽代碼

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

git-svn-id: trunk@16108 -
pierre 15 年之前
父節點
當前提交
1d2581b6d9
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      compiler/pdecl.pas

+ 3 - 0
compiler/pdecl.pas

@@ -284,6 +284,9 @@ implementation
                 else
                 else
                   labelsym:=tlabelsym.create(pattern);
                   labelsym:=tlabelsym.create(pattern);
                 symtablestack.top.insert(labelsym);
                 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
                 if m_iso in current_settings.modeswitches then
                   begin
                   begin
                     if symtablestack.top.symtabletype=localsymtable then
                     if symtablestack.top.symtabletype=localsymtable then