Browse Source

* Renamed global symbol INITEXTRTTIUNITS to RTTIUNITLIST
* Renamed extrttiinfo to rttiunitinfo
* Renamed .extrtti section to just .rtti
* Renamed sec_extrtti to sec_rtti
* Renamed InsertExtRTTITable to InsertRTTIUnitList
* Renamed procedure start_write_unit_extrtti_info to start_write_unit_info
* Renamed procedure after_write_unit_extrtti_info to after_write_unit_info
* Renamed procedure InsertExtRTTITable to InsertRTTIUnitList

git-svn-id: branches/joost/classattributes@25253 -

joost 12 years ago
parent
commit
45338f7f75

+ 1 - 1
compiler/aasmbase.pas

@@ -97,7 +97,7 @@ interface
                   "If special .fpc section cannot be used on some target,
                   .text can be used instead." }
          sec_fpc,
-         sec_extrtti,
+         sec_rtti,
          { Table of contents section }
          sec_toc,
          sec_init,

+ 5 - 5
compiler/aggas.pas

@@ -279,7 +279,7 @@ implementation
           '.eh_frame',
           '.debug_frame','.debug_info','.debug_line','.debug_abbrev',
           '.fpc',
-          '.extrtti',
+          '.rtti',
           '.toc',
           '.init',
           '.fini',
@@ -337,7 +337,7 @@ implementation
           '.eh_frame',
           '.debug_frame','.debug_info','.debug_line','.debug_abbrev',
           '.fpc',
-          '.extrtti',
+          '.rtti',
           '.toc',
           '.init',
           '.fini',
@@ -443,7 +443,7 @@ implementation
             result:='d';
 
           { TODO: these need a fix to become read-only }
-          sec_rodata, sec_rodata_norel, sec_extrtti:
+          sec_rodata, sec_rodata_norel, sec_rtti:
             result:='d';
 
           sec_bss:
@@ -1631,9 +1631,9 @@ implementation
                 result := '.section __TEXT, .fpc, regular, no_dead_strip';
                 exit;
               end;
-            sec_extrtti:
+            sec_rtti:
               begin
-                result := '.section __FPC, .extrtti, regular';
+                result := '.section __FPC, .rtti, regular';
                 exit;
               end;
             sec_code:

+ 2 - 2
compiler/fmodule.pas

@@ -184,7 +184,7 @@ interface
         deprecatedmsg: pshortstring;
 
         { contains a reference to the TUnitInfo rtti information for this module }
-        extrttiinfo : TAsmSymbol;
+        rttiunitinfo : TAsmSymbol;
         rtti_options : trtti_moduleoptions;
 
         { contains a list of types that are extended by helper types; the key is
@@ -565,7 +565,7 @@ implementation
         deprecatedmsg:=nil;
         namespace:=nil;
         tcinitcode:=nil;
-        extrttiinfo:=nil;
+        rttiunitinfo:=nil;
         _exports:=TLinkedList.Create;
         dllscannerinputlist:=TFPHashList.Create;
         asmdata:=casmdata.create(realmodulename^);

+ 11 - 11
compiler/ncgrtti.pas

@@ -58,8 +58,8 @@ interface
         function  get_rtti_label(def:tdef;rt:trttitype):tasmsymbol;
         function  get_rtti_label_ord2str(def:tdef;rt:trttitype):tasmsymbol;
         function  get_rtti_label_str2ord(def:tdef;rt:trttitype):tasmsymbol;
-        procedure start_write_unit_extrtti_info;
-        procedure after_write_unit_extrtti_info(st: TSymtable);
+        procedure start_write_unit_info;
+        procedure after_write_unit_info(st: TSymtable);
       end;
 
     var
@@ -106,7 +106,7 @@ implementation
     procedure TRTTIWriter.write_unitinfo_reference;
       begin
       { write reference to TUnitInfo }
-        current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_sym(current_module.extrttiinfo));
+        current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_sym(current_module.rttiunitinfo));
       end;
 
     function TRTTIWriter.rtti_asmlist(rt: trttitype): TAsmListType;
@@ -1296,9 +1296,9 @@ implementation
         rttilab:=current_asmdata.DefineAsmSymbol(tstoreddef(def).rtti_mangledname(rt),AB_GLOBAL,AT_DATA);
         maybe_new_object_file(current_asmdata.asmlists[rtti_asmlist(rt)]);
         if rt=fullrtti then
-          new_section(current_asmdata.asmlists[rtti_asmlist(rt)],sec_extrtti,make_mangledname('EXTRU',current_module.localsymtable,''),const_align(sizeof(pint)))
+          new_section(current_asmdata.asmlists[rtti_asmlist(rt)],sec_rtti,make_mangledname('RTTIU',current_module.localsymtable,''),const_align(sizeof(pint)))
         else
-          new_section(current_asmdata.asmlists[rtti_asmlist(rt)],sec_rodata,make_mangledname('EXTRU',current_module.localsymtable,''),const_align(sizeof(pint)));
+          new_section(current_asmdata.asmlists[rtti_asmlist(rt)],sec_rodata,make_mangledname('RTTIU',current_module.localsymtable,''),const_align(sizeof(pint)));
 
         current_asmdata.asmlists[rtti_asmlist(rt)].concat(Tai_symbol.Create_global(rttilab,0));
         write_rtti_data(def,rt);
@@ -1322,15 +1322,15 @@ implementation
         result:=current_asmdata.RefAsmSymbol(def.rtti_mangledname(rt)+'_s2o');
       end;
 
-    procedure TRTTIWriter.start_write_unit_extrtti_info;
+    procedure TRTTIWriter.start_write_unit_info;
       var
         s                         : string;
       begin
-        new_section(current_asmdata.asmlists[al_rtti],sec_extrtti,make_mangledname('EXTRU',current_module.localsymtable,''),const_align(sizeof(pint)));
+        new_section(current_asmdata.asmlists[al_rtti],sec_rtti,make_mangledname('RTTIU',current_module.localsymtable,''),const_align(sizeof(pint)));
 
         { Make symbol that point to the start of the TUnitInfo }
-        current_module.extrttiinfo := current_asmdata.DefineAsmSymbol(make_mangledname('EXTRU_',current_module.localsymtable,''),AB_GLOBAL,AT_DATA);
-        current_asmdata.asmlists[al_rtti].Concat(Tai_symbol.Create_global(current_module.extrttiinfo,0));
+        current_module.rttiunitinfo := current_asmdata.DefineAsmSymbol(make_mangledname('RTTIU_',current_module.localsymtable,''),AB_GLOBAL,AT_DATA);
+        current_asmdata.asmlists[al_rtti].Concat(Tai_symbol.Create_global(current_module.rttiunitinfo,0));
 
         { write TUnitInfo }
 
@@ -1346,7 +1346,7 @@ implementation
       end;
 
 
-    procedure TRTTIWriter.after_write_unit_extrtti_info(st: TSymtable);
+    procedure TRTTIWriter.after_write_unit_info(st: TSymtable);
       var
         start_extrtti_symbollist,
         end_extrtti_symbollist    : TAsmSymbol;
@@ -1357,7 +1357,7 @@ implementation
         unitname_item             : TLinkedListItem;
         s                         : string;
     begin
-      if current_module.extrttiinfo<>nil then
+      if current_module.rttiunitinfo<>nil then
         begin
           { Write a trailing 255 to mark the end of the symbols-list }
           current_asmdata.asmlists[al_rtti].concat(cai_align.Create(sizeof(TConstPtrUInt)));

+ 6 - 6
compiler/ngenutil.pas

@@ -72,7 +72,7 @@ interface
 
       class function create_main_procdef(const name: string; potype:tproctypeoption; ps: tprocsym):tdef; virtual;
       class procedure InsertInitFinalTable; virtual;
-      class procedure InsertExtRTTITable; virtual;
+      class procedure InsertRTTIUnitList; virtual;
      protected
       class procedure InsertRuntimeInits(const prefix:string;list:TLinkedList;unitflag:cardinal); virtual;
       class procedure InsertRuntimeInitsTablesTable(const prefix,tablename:string;unitflag:cardinal); virtual;
@@ -645,7 +645,7 @@ implementation
     end;
 
 
-    class procedure tnodeutils.InsertExtRTTITable;
+    class procedure tnodeutils.InsertRTTIUnitList;
       var
         hp : tused_unit;
         unitinits : TAsmList;
@@ -656,7 +656,7 @@ implementation
       hp:=tused_unit(usedunits.first);
       while assigned(hp) do
        begin
-         unitinits.concat(Tai_const.Createname(make_mangledname('EXTRU_',hp.u.globalsymtable,''),0));
+         unitinits.concat(Tai_const.Createname(make_mangledname('RTTIU_',hp.u.globalsymtable,''),0));
          inc(count);
          hp:=tused_unit(hp.next);
        end;
@@ -664,10 +664,10 @@ implementation
       unitinits.insert(Tai_const.Create_32bit(count));
       { Add to data segment }
       maybe_new_object_file(current_asmdata.asmlists[al_globals]);
-      new_section(current_asmdata.asmlists[al_globals],sec_data,'INITEXTRTTIUNITS',sizeof(pint));
-      current_asmdata.asmlists[al_globals].concat(Tai_symbol.Createname_global('INITEXTRTTIUNITS',AT_DATA,0));
+      new_section(current_asmdata.asmlists[al_globals],sec_data,'RTTIUNITLIST',sizeof(pint));
+      current_asmdata.asmlists[al_globals].concat(Tai_symbol.Createname_global('RTTIUNITLIST',AT_DATA,0));
       current_asmdata.asmlists[al_globals].concatlist(unitinits);
-      current_asmdata.asmlists[al_globals].concat(Tai_symbol_end.Createname('INITEXTRTTIUNITS'));
+      current_asmdata.asmlists[al_globals].concat(Tai_symbol_end.Createname('RTTIUNITLIST'));
       unitinits.free;
     end;
 

+ 1 - 1
compiler/ogcoff.pas

@@ -495,7 +495,7 @@ implementation
           '.eh_frame',
           '.debug_frame','.debug_info','.debug_line','.debug_abbrev',
           '.fpc',
-          '.extrtti',
+          '.rtti',
           '',
           '.init',
           '.fini',

+ 2 - 2
compiler/ogelf.pas

@@ -766,7 +766,7 @@ implementation
           '.eh_frame',
           '.debug_frame','.debug_info','.debug_line','.debug_abbrev',
           '.fpc',
-          '.extrtti',
+          '.rtti',
           '.toc',
           '.init',
           '.fini',
@@ -824,7 +824,7 @@ implementation
           '.eh_frame',
           '.debug_frame','.debug_info','.debug_line','.debug_abbrev',
           '.fpc',
-          '.extrtti',
+          '.rtti',
           '.toc',
           '.init',
           '.fini',

+ 1 - 1
compiler/pmodules.pas

@@ -2124,7 +2124,7 @@ implementation
          cnodeutils.InsertWideInitsTablesTable;
          cnodeutils.InsertResStrTablesTable;
          cnodeutils.InsertMemorySizes;
-         cnodeutils.InsertExtRTTITable;
+         cnodeutils.InsertRTTIUnitList;
 
 {$ifdef FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
          if target_info.system in systems_interrupt_table then

+ 3 - 3
compiler/ptype.pas

@@ -1681,8 +1681,8 @@ implementation
 {$endif jvm}
         { Always write the TUnitInfo, even if there is further no type
           information for the module }
-        if current_module.extrttiinfo=nil then
-          RTTIWriter.start_write_unit_extrtti_info;
+        if current_module.rttiunitinfo=nil then
+          RTTIWriter.start_write_unit_info;
         for i:=0 to st.DefList.Count-1 do
           begin
             def:=tdef(st.DefList[i]);
@@ -1738,7 +1738,7 @@ implementation
               RTTIWriter.write_rtti(def,fullrtti);
           end;
         if st.symtabletype = staticsymtable then
-          RTTIWriter.after_write_unit_extrtti_info(st);
+          RTTIWriter.after_write_unit_info(st);
       end;
 
 

+ 1 - 1
compiler/x86/agx86nsm.pas

@@ -440,7 +440,7 @@ interface
           '.eh_frame',
           '.debug_frame','.debug_info','.debug_line','.debug_abbrev',
           '.fpc',
-          '.extrtti',
+          '.rtti',
           '',
           '.init',
           '.fini',

+ 1 - 1
rtl/objpas/typinfo.pp

@@ -457,7 +457,7 @@ function aligntoptr(p : pointer) : pointer;inline;
 
 {$ifdef FPC_HAS_EXTENDED_RTTI}
 var
-  UnitList: TUnitInfoList; external name 'INITEXTRTTIUNITS';
+  UnitList: TUnitInfoList; external name 'RTTIUNITLIST';
 {$endif FPC_HAS_EXTENDED_RTTI}
 
 function GetUnitList: PUnitInfoList;