Browse Source

* Revert part of r22548, correct fix for the issue is provided by r23188.
Only referencing data labels from code should change "GOT is needed" property. Writing data labels or referencing them from data should have no effect on it.

git-svn-id: trunk@23363 -

sergei 12 years ago
parent
commit
ad1621df3f
1 changed files with 1 additions and 19 deletions
  1. 1 19
      compiler/nobj.pas

+ 1 - 19
compiler/nobj.pas

@@ -112,7 +112,7 @@ implementation
     uses
     uses
        SysUtils,
        SysUtils,
        globals,verbose,systems,
        globals,verbose,systems,
-       node,procinfo,
+       node,
        symbase,symtable,symconst,symtype,defcmp,
        symbase,symtable,symconst,symtype,defcmp,
        cgbase,parabase,paramgr,
        cgbase,parabase,paramgr,
        dbgbase,
        dbgbase,
@@ -1049,9 +1049,6 @@ implementation
         len : byte;
         len : byte;
       begin
       begin
          current_asmdata.getdatalabel(p^.nl);
          current_asmdata.getdatalabel(p^.nl);
-         if (cs_create_pic in current_settings.moduleswitches) and
-            assigned(current_procinfo) then
-           include(current_procinfo.flags,pi_needs_got);
          if assigned(p^.l) then
          if assigned(p^.l) then
            writenames(list,p^.l);
            writenames(list,p^.l);
          list.concat(cai_align.create(const_align(sizeof(pint))));
          list.concat(cai_align.create(const_align(sizeof(pint))));
@@ -1072,9 +1069,6 @@ implementation
          if assigned(p^.l) then
          if assigned(p^.l) then
            writestrentry(list,p^.l);
            writestrentry(list,p^.l);
 
 
-         if (cs_create_pic in current_settings.moduleswitches) and
-            assigned(current_procinfo) then
-           include(current_procinfo.flags,pi_needs_got);
          { write name label }
          { write name label }
          list.concat(cai_align.create(const_align(sizeof(pint))));
          list.concat(cai_align.create(const_align(sizeof(pint))));
          list.concat(Tai_const.Create_sym(p^.nl));
          list.concat(Tai_const.Create_sym(p^.nl));
@@ -1099,9 +1093,6 @@ implementation
          if assigned(root) then
          if assigned(root) then
            writenames(list,root);
            writenames(list,root);
 
 
-         if (cs_create_pic in current_settings.moduleswitches) and
-            assigned(current_procinfo) then
-           include(current_procinfo.flags,pi_needs_got);
          { now start writing of the message string table }
          { now start writing of the message string table }
          current_asmdata.getlabel(result,alt_data);
          current_asmdata.getlabel(result,alt_data);
          list.concat(cai_align.create(const_align(sizeof(pint))));
          list.concat(cai_align.create(const_align(sizeof(pint))));
@@ -1122,9 +1113,6 @@ implementation
          if assigned(p^.l) then
          if assigned(p^.l) then
            writeintentry(list,p^.l);
            writeintentry(list,p^.l);
 
 
-         if (cs_create_pic in current_settings.moduleswitches) and
-            assigned(current_procinfo) then
-           include(current_procinfo.flags,pi_needs_got);
          { write name label }
          { write name label }
          list.concat(cai_align.create(const_align(sizeof(longint))));
          list.concat(cai_align.create(const_align(sizeof(longint))));
          list.concat(Tai_const.Create_32bit(p^.data.messageinf.i));
          list.concat(Tai_const.Create_32bit(p^.data.messageinf.i));
@@ -1146,9 +1134,6 @@ implementation
          { insert all message handlers into a tree, sorted by name }
          { insert all message handlers into a tree, sorted by name }
          _class.symtable.SymList.ForEachCall(@insertmsgint,@count);
          _class.symtable.SymList.ForEachCall(@insertmsgint,@count);
 
 
-         if (cs_create_pic in current_settings.moduleswitches) and
-            assigned(current_procinfo) then
-           include(current_procinfo.flags,pi_needs_got);
          { now start writing of the message string table }
          { now start writing of the message string table }
          current_asmdata.getlabel(r,alt_data);
          current_asmdata.getlabel(r,alt_data);
          list.concat(cai_align.create(const_align(sizeof(pint))));
          list.concat(cai_align.create(const_align(sizeof(pint))));
@@ -1410,9 +1395,6 @@ implementation
     function  TVMTWriter.intf_get_vtbl_name(AImplIntf:TImplementedInterface): string;
     function  TVMTWriter.intf_get_vtbl_name(AImplIntf:TImplementedInterface): string;
       begin
       begin
         result:=make_mangledname('VTBL',_class.owner,_class.objname^+'_$_'+AImplIntf.IntfDef.objname^);
         result:=make_mangledname('VTBL',_class.owner,_class.objname^+'_$_'+AImplIntf.IntfDef.objname^);
-         if (cs_create_pic in current_settings.moduleswitches) and
-            assigned(current_procinfo) then
-           include(current_procinfo.flags,pi_needs_got);
       end;
       end;