Browse Source

* write .size also

peter 26 years ago
parent
commit
674e0cc879

+ 40 - 5
compiler/aasm.pas

@@ -37,6 +37,7 @@ unit aasm;
           ait_instruction,
           ait_instruction,
           ait_datablock,
           ait_datablock,
           ait_symbol,
           ait_symbol,
+          ait_symbol_end, { needed to calc the size of a symbol }
           ait_const_32bit,
           ait_const_32bit,
           ait_const_16bit,
           ait_const_16bit,
           ait_const_8bit,
           ait_const_8bit,
@@ -124,9 +125,17 @@ unit aasm;
        tai_symbol = object(tai)
        tai_symbol = object(tai)
           sym : pasmsymbol;
           sym : pasmsymbol;
           is_global : boolean;
           is_global : boolean;
+          size : longint;
+          constructor init(_sym:PAsmSymbol;siz:longint);
+          constructor initname(const _name : string;siz:longint);
+          constructor initname_global(const _name : string;siz:longint);
+       end;
+
+       pai_symbol_end = ^tai_symbol_end;
+       tai_symbol_end = object(tai)
+          sym : pasmsymbol;
           constructor init(_sym:PAsmSymbol);
           constructor init(_sym:PAsmSymbol);
           constructor initname(const _name : string);
           constructor initname(const _name : string);
-          constructor initname_global(const _name : string);
        end;
        end;
 
 
        pai_label = ^tai_label;
        pai_label = ^tai_label;
@@ -364,30 +373,53 @@ uses
                                TAI_SYMBOL
                                TAI_SYMBOL
  ****************************************************************************}
  ****************************************************************************}
 
 
-    constructor tai_symbol.init(_sym:PAsmSymbol);
+    constructor tai_symbol.init(_sym:PAsmSymbol;siz:longint);
       begin
       begin
          inherited init;
          inherited init;
          typ:=ait_symbol;
          typ:=ait_symbol;
          sym:=_sym;
          sym:=_sym;
+         size:=siz;
+         is_global:=(sym^.typ=AS_GLOBAL);
       end;
       end;
 
 
-    constructor tai_symbol.initname(const _name : string);
+    constructor tai_symbol.initname(const _name : string;siz:longint);
       begin
       begin
          inherited init;
          inherited init;
          typ:=ait_symbol;
          typ:=ait_symbol;
          sym:=newasmsymboltyp(_name,AS_LOCAL);
          sym:=newasmsymboltyp(_name,AS_LOCAL);
+         size:=siz;
          is_global:=false;
          is_global:=false;
       end;
       end;
 
 
-    constructor tai_symbol.initname_global(const _name : string);
+    constructor tai_symbol.initname_global(const _name : string;siz:longint);
       begin
       begin
          inherited init;
          inherited init;
          typ:=ait_symbol;
          typ:=ait_symbol;
          sym:=newasmsymboltyp(_name,AS_GLOBAL);
          sym:=newasmsymboltyp(_name,AS_GLOBAL);
+         size:=siz;
          is_global:=true;
          is_global:=true;
       end;
       end;
 
 
 
 
+{****************************************************************************
+                               TAI_SYMBOL
+ ****************************************************************************}
+
+    constructor tai_symbol_end.init(_sym:PAsmSymbol);
+      begin
+         inherited init;
+         typ:=ait_symbol_end;
+         sym:=_sym;
+      end;
+
+    constructor tai_symbol_end.initname(const _name : string);
+      begin
+         inherited init;
+         typ:=ait_symbol_end;
+         sym:=newasmsymboltyp(_name,AS_GLOBAL);
+      end;
+
+
 {****************************************************************************
 {****************************************************************************
                                TAI_CONST
                                TAI_CONST
  ****************************************************************************}
  ****************************************************************************}
@@ -901,7 +933,10 @@ uses
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.53  1999-07-22 09:37:28  florian
+  Revision 1.54  1999-07-29 20:53:55  peter
+    * write .size also
+
+  Revision 1.53  1999/07/22 09:37:28  florian
     + resourcestring implemented
     + resourcestring implemented
     + start of longstring support
     + start of longstring support
 
 

+ 17 - 2
compiler/ag386att.pas

@@ -45,7 +45,7 @@ unit ag386att;
 {$ifdef Delphi}
 {$ifdef Delphi}
       dmisc,
       dmisc,
 {$else Delphi}
 {$else Delphi}
-      dos, 
+      dos,
 {$endif Delphi}
 {$endif Delphi}
       strings,
       strings,
       globtype,globals,systems,
       globtype,globals,systems,
@@ -71,6 +71,7 @@ unit ag386att;
       lastfileinfo : tfileposinfo;
       lastfileinfo : tfileposinfo;
       infile,
       infile,
       lastinfile   : pinputfile;
       lastinfile   : pinputfile;
+      symendcount  : longint;
 
 
    function fixline(s:string):string;
    function fixline(s:string):string;
    {
    {
@@ -640,10 +641,20 @@ unit ag386att;
                     AsmWriteLn(',@object')
                     AsmWriteLn(',@object')
                    else
                    else
                     AsmWriteLn(',@function');
                     AsmWriteLn(',@function');
+                   if pai_symbol(hp)^.sym^.size>0 then
+                    AsmWriteLn(#9'.size'#9+pai_symbol(hp)^.sym^.name+', '+tostr(pai_symbol(hp)^.sym^.size));
                 end;
                 end;
                AsmWriteLn(pai_symbol(hp)^.sym^.name+':');
                AsmWriteLn(pai_symbol(hp)^.sym^.name+':');
              end;
              end;
 
 
+           ait_symbol_end :
+             begin
+               s:=target_asm.labelprefix+'e'+tostr(symendcount);
+               inc(symendcount);
+               AsmWriteLn(s+':');
+               AsmWriteLn(#9'.size'#9+pai_symbol(hp)^.sym^.name+', '+s+' - '+pai_symbol(hp)^.sym^.name);
+             end;
+
            ait_instruction :
            ait_instruction :
              begin
              begin
                op:=pai386(hp)^.opcode;
                op:=pai386(hp)^.opcode;
@@ -791,6 +802,7 @@ unit ag386att;
       WriteFileLineInfo(fileinfo);
       WriteFileLineInfo(fileinfo);
 {$endif GDB}
 {$endif GDB}
       AsmStartSize:=AsmSize;
       AsmStartSize:=AsmSize;
+      symendcount:=0;
 
 
       countlabelref:=false;
       countlabelref:=false;
       If (cs_debuginfo in aktmoduleswitches) then
       If (cs_debuginfo in aktmoduleswitches) then
@@ -817,7 +829,10 @@ unit ag386att;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.5  1999-07-22 09:37:29  florian
+  Revision 1.6  1999-07-29 20:53:56  peter
+    * write .size also
+
+  Revision 1.5  1999/07/22 09:37:29  florian
     + resourcestring implemented
     + resourcestring implemented
     + start of longstring support
     + start of longstring support
 
 

+ 8 - 3
compiler/cgai386.pas

@@ -2816,9 +2816,9 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
          while hs<>'' do
          while hs<>'' do
           begin
           begin
             if make_global then
             if make_global then
-              exprasmlist^.insert(new(pai_symbol,initname_global(hs)))
+              exprasmlist^.insert(new(pai_symbol,initname_global(hs,0)))
             else
             else
-              exprasmlist^.insert(new(pai_symbol,initname(hs)));
+              exprasmlist^.insert(new(pai_symbol,initname(hs,0)));
 
 
 {$ifdef GDB}
 {$ifdef GDB}
             if (cs_debuginfo in aktmoduleswitches) and
             if (cs_debuginfo in aktmoduleswitches) and
@@ -3044,6 +3044,8 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
           exprasmlist^.concat(new(pai386,op_const(A_RET,S_NO,parasize)));
           exprasmlist^.concat(new(pai386,op_const(A_RET,S_NO,parasize)));
        end;
        end;
 
 
+      exprasmlist^.concat(new(pai_symbol_end,initname(aktprocsym^.definition^.mangledname)));
+
 {$ifdef GDB}
 {$ifdef GDB}
       if (cs_debuginfo in aktmoduleswitches) and not inlined  then
       if (cs_debuginfo in aktmoduleswitches) and not inlined  then
           begin
           begin
@@ -3116,7 +3118,10 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.18  1999-07-26 12:13:46  florian
+  Revision 1.19  1999-07-29 20:53:58  peter
+    * write .size also
+
+  Revision 1.18  1999/07/26 12:13:46  florian
     * exit in try..finally blocks needed a second fix
     * exit in try..finally blocks needed a second fix
     * a raise in a try..finally lead into a endless loop, fixed
     * a raise in a try..finally lead into a endless loop, fixed
 
 

+ 25 - 21
compiler/cresstr.pas

@@ -33,7 +33,7 @@ unit cresstr;
     uses
     uses
        globals,aasm,verbose,files;
        globals,aasm,verbose,files;
 
 
-    Type 
+    Type
       PResourcestring = ^TResourceString;
       PResourcestring = ^TResourceString;
       TResourceString = record
       TResourceString = record
         Name : String;
         Name : String;
@@ -48,14 +48,14 @@ unit cresstr;
        resstrcount : longint = 0;
        resstrcount : longint = 0;
        resourcefilename = 'resource.rst';
        resourcefilename = 'resource.rst';
 
 
-    Var        
+    Var
       ResourceListRoot : PResourceString;
       ResourceListRoot : PResourceString;
-       
+
     { calcs the hash value for a give resourcestring, len is }
     { calcs the hash value for a give resourcestring, len is }
     { necessary because the resourcestring can contain #0    }
     { necessary because the resourcestring can contain #0    }
 
 
     function calc_resstring_hashvalue(p : pchar;len : longint) : longint;
     function calc_resstring_hashvalue(p : pchar;len : longint) : longint;
-    
+
       Var hash,g,I : longint;
       Var hash,g,I : longint;
 
 
       begin
       begin
@@ -69,7 +69,7 @@ unit cresstr;
              begin
              begin
              hash:=hash xor (g shr 24);
              hash:=hash xor (g shr 24);
              hash:=hash xor g;
              hash:=hash xor g;
-             end; 
+             end;
            end;
            end;
          If Hash=0 then
          If Hash=0 then
            Calc_resstring_hashvalue:=Not(0)
            Calc_resstring_hashvalue:=Not(0)
@@ -83,14 +83,15 @@ unit cresstr;
          if not(assigned(resourcestringlist)) then
          if not(assigned(resourcestringlist)) then
            resourcestringlist:=new(paasmoutput,init);
            resourcestringlist:=new(paasmoutput,init);
          resourcestringlist^.insert(new(pai_const,init_32bit(resstrcount)));
          resourcestringlist^.insert(new(pai_const,init_32bit(resstrcount)));
-         resourcestringlist^.insert(new(pai_symbol,initname_global('RESOURCESTRINGLIST')));
+         resourcestringlist^.insert(new(pai_symbol,initname_global('RESOURCESTRINGLIST',0)));
+         resourcestringlist^.concat(new(pai_symbol_end,initname('RESOURCESTRINGLIST')));
       end;
       end;
 
 
 
 
     Procedure AppendToResourceList(const name : string;p : pchar;len,hash : longint);
     Procedure AppendToResourceList(const name : string;p : pchar;len,hash : longint);
-    
+
     Var R : PResourceString;
     Var R : PResourceString;
-    
+
     begin
     begin
       inc(resstrcount);
       inc(resstrcount);
       New(R);
       New(R);
@@ -117,8 +118,8 @@ unit cresstr;
          if not(assigned(resourcestringlist)) then
          if not(assigned(resourcestringlist)) then
            resourcestringlist:=new(paasmoutput,init);
            resourcestringlist:=new(paasmoutput,init);
 
 
-         AppendToResourceList(current_module^.modulename^+'.'+Name,P,Len,Hash);  
-         
+         AppendToResourceList(current_module^.modulename^+'.'+Name,P,Len,Hash);
+
          { an empty ansi string is nil! }
          { an empty ansi string is nil! }
          if (p=nil) or (len=0) then
          if (p=nil) or (len=0) then
            resourcestringlist^.concat(new(pai_const,init_32bit(0)))
            resourcestringlist^.concat(new(pai_const,init_32bit(0)))
@@ -145,25 +146,25 @@ unit cresstr;
       end;
       end;
 
 
     Procedure WriteResourceFile(Filename : String);
     Procedure WriteResourceFile(Filename : String);
-    
+
     Type
     Type
        TMode = (quoted,unquoted);
        TMode = (quoted,unquoted);
-    
+
     Var F : Text;
     Var F : Text;
         Mode : TMode;
         Mode : TMode;
         old : PresourceString;
         old : PresourceString;
         C : char;
         C : char;
         Col,i : longint;
         Col,i : longint;
-        
+
        Procedure Add(Const S : String);
        Procedure Add(Const S : String);
-       
+
        begin
        begin
          Write(F,S);
          Write(F,S);
          Col:=Col+length(s);
          Col:=Col+length(s);
        end;
        end;
-        
+
     begin
     begin
-      If resstrCount=0 then 
+      If resstrCount=0 then
         exit;
         exit;
       FileName:=ForceExtension(lower(FileName),'.rst');
       FileName:=ForceExtension(lower(FileName),'.rst');
       message1 (general_i_writingresourcefile,filename);
       message1 (general_i_writingresourcefile,filename);
@@ -189,7 +190,7 @@ unit cresstr;
            C:=Value[i];
            C:=Value[i];
            If (ord(C)>31) and (Ord(c)<=128) and (c<>'''') then
            If (ord(C)>31) and (Ord(c)<=128) and (c<>'''') then
              begin
              begin
-             If mode=Quoted then 
+             If mode=Quoted then
                Add(c)
                Add(c)
              else
              else
                begin
                begin
@@ -204,10 +205,10 @@ unit cresstr;
                Add('''');
                Add('''');
                mode:=unquoted;
                mode:=unquoted;
                end;
                end;
-             Add('#'+tostr(ord(c)));  
+             Add('#'+tostr(ord(c)));
              end;
              end;
            If Col>72 then
            If Col>72 then
-             begin 
+             begin
              if mode=quoted then
              if mode=quoted then
                Write (F,'''');
                Write (F,'''');
              Writeln(F,'+');
              Writeln(F,'+');
@@ -215,7 +216,7 @@ unit cresstr;
              Mode:=unQuoted;
              Mode:=unQuoted;
              end;
              end;
            end;
            end;
-         if mode=quoted then writeln (f,'''');  
+         if mode=quoted then writeln (f,'''');
          Writeln(f);
          Writeln(f);
          Old :=ResourceListRoot;
          Old :=ResourceListRoot;
          ResourceListRoot:=old^.Next;
          ResourceListRoot:=old^.Next;
@@ -228,7 +229,10 @@ unit cresstr;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.7  1999-07-26 09:42:00  florian
+  Revision 1.8  1999-07-29 20:54:01  peter
+    * write .size also
+
+  Revision 1.7  1999/07/26 09:42:00  florian
     * bugs 494-496 fixed
     * bugs 494-496 fixed
 
 
   Revision 1.6  1999/07/25 19:27:15  michael
   Revision 1.6  1999/07/25 19:27:15  michael

+ 10 - 2
compiler/pdecl.pas

@@ -1553,6 +1553,8 @@ unit pdecl;
 
 
               { pointer to class name string }
               { pointer to class name string }
               datasegment^.concat(new(pai_const_symbol,init(classnamelabel)));
               datasegment^.concat(new(pai_const_symbol,init(classnamelabel)));
+
+              datasegment^.concat(new(pai_symbol_end,init(classnamelabel)));
            end;
            end;
 {$ifdef GDB}
 {$ifdef GDB}
          { generate the VMT }
          { generate the VMT }
@@ -1567,7 +1569,7 @@ unit pdecl;
 {$endif GDB}
 {$endif GDB}
          if ((aktclass^.options and oo_hasvmt)<>0) then
          if ((aktclass^.options and oo_hasvmt)<>0) then
            begin
            begin
-              datasegment^.concat(new(pai_symbol,initname_global(aktclass^.vmt_mangledname)));
+              datasegment^.concat(new(pai_symbol,initname_global(aktclass^.vmt_mangledname,0)));
 
 
               { determine the size with publicsyms^.datasize, because }
               { determine the size with publicsyms^.datasize, because }
               { size gives back 4 for classes                    }
               { size gives back 4 for classes                    }
@@ -1588,6 +1590,9 @@ unit pdecl;
 
 
               { this generates the entries }
               { this generates the entries }
               genvmt(aktclass);
               genvmt(aktclass);
+
+              { write the size of the VMT }
+              datasegment^.concat(new(pai_symbol_end,initname(aktclass^.vmt_mangledname)));
            end;
            end;
 
 
          { restore old state }
          { restore old state }
@@ -2286,7 +2291,10 @@ unit pdecl;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.136  1999-07-27 23:42:11  peter
+  Revision 1.137  1999-07-29 20:54:02  peter
+    * write .size also
+
+  Revision 1.136  1999/07/27 23:42:11  peter
     * indirect type referencing is now allowed
     * indirect type referencing is now allowed
 
 
   Revision 1.135  1999/07/23 16:05:23  peter
   Revision 1.135  1999/07/23 16:05:23  peter

+ 9 - 5
compiler/pmodules.pas

@@ -150,7 +150,8 @@ unit pmodules;
         { TableCount,InitCount }
         { TableCount,InitCount }
         unitinits.insert(new(pai_const,init_32bit(0)));
         unitinits.insert(new(pai_const,init_32bit(0)));
         unitinits.insert(new(pai_const,init_32bit(count)));
         unitinits.insert(new(pai_const,init_32bit(count)));
-        unitinits.insert(new(pai_symbol,initname_global('INITFINAL')));
+        unitinits.insert(new(pai_symbol,initname_global('INITFINAL',0)));
+        unitinits.concat(new(pai_symbol_end,initname('INITFINAL')));
         { insert in data segment }
         { insert in data segment }
         if (cs_smartlink in aktmoduleswitches) then
         if (cs_smartlink in aktmoduleswitches) then
           datasegment^.concat(new(pai_cut,init));
           datasegment^.concat(new(pai_cut,init));
@@ -187,7 +188,7 @@ unit pmodules;
            bsssegment^.concat(new(pai_datablock,init_global('HEAP',heapsize)));
            bsssegment^.concat(new(pai_datablock,init_global('HEAP',heapsize)));
          end;
          end;
 {$ifdef i386}
 {$ifdef i386}
-         datasegment^.concat(new(pai_symbol,initname_global('HEAPSIZE')));
+         datasegment^.concat(new(pai_symbol,initname_global('HEAPSIZE',4)));
          datasegment^.concat(new(pai_const,init_32bit(heapsize)));
          datasegment^.concat(new(pai_const,init_32bit(heapsize)));
 {$endif i386}
 {$endif i386}
 {$ifdef m68k}
 {$ifdef m68k}
@@ -207,7 +208,7 @@ unit pmodules;
           target_i386_GO32V2 :
           target_i386_GO32V2 :
             begin
             begin
               { stacksize can be specified }
               { stacksize can be specified }
-              datasegment^.concat(new(pai_symbol,initname_global('__stklen')));
+              datasegment^.concat(new(pai_symbol,initname_global('__stklen',4)));
               datasegment^.concat(new(pai_const,init_32bit(stacksize)));
               datasegment^.concat(new(pai_const,init_32bit(stacksize)));
             end;
             end;
           target_i386_WIN32 :
           target_i386_WIN32 :
@@ -240,7 +241,7 @@ unit pmodules;
           target_m68k_Atari :
           target_m68k_Atari :
             begin
             begin
               { stacksize can be specified }
               { stacksize can be specified }
-              datasegment^.concat(new(pai_symbol,init_global('__stklen')));
+              datasegment^.concat(new(pai_symbol,init_global('__stklen',4)));
               datasegment^.concat(new(pai_const,init_32bit(stacksize)));
               datasegment^.concat(new(pai_const,init_32bit(stacksize)));
             end;
             end;
 {$endif m68k}
 {$endif m68k}
@@ -1351,7 +1352,10 @@ unit pmodules;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.134  1999-07-26 09:42:11  florian
+  Revision 1.135  1999-07-29 20:54:04  peter
+    * write .size also
+
+  Revision 1.134  1999/07/26 09:42:11  florian
     * bugs 494-496 fixed
     * bugs 494-496 fixed
 
 
   Revision 1.133  1999/07/24 00:13:25  peter
   Revision 1.133  1999/07/24 00:13:25  peter

+ 6 - 3
compiler/rautils.pas

@@ -1347,7 +1347,7 @@ end;
   {  linked list of instructions.(used by AT&T styled asm)              }
   {  linked list of instructions.(used by AT&T styled asm)              }
   {*********************************************************************}
   {*********************************************************************}
    begin
    begin
-       p^.concat(new(pai_symbol,initname_global(s)));
+       p^.concat(new(pai_symbol,initname_global(s,0)));
    end;
    end;
 
 
    procedure ConcatLocal(p:paasmoutput;const s : string);
    procedure ConcatLocal(p:paasmoutput;const s : string);
@@ -1357,7 +1357,7 @@ end;
   {  linked list of instructions.                                       }
   {  linked list of instructions.                                       }
   {*********************************************************************}
   {*********************************************************************}
    begin
    begin
-       p^.concat(new(pai_symbol,initname(s)));
+       p^.concat(new(pai_symbol,initname(s,0)));
    end;
    end;
 
 
   Procedure ConcatGlobalBss(const s : string;size : longint);
   Procedure ConcatGlobalBss(const s : string;size : longint);
@@ -1383,7 +1383,10 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.19  1999-06-02 22:44:17  pierre
+  Revision 1.20  1999-07-29 20:54:06  peter
+    * write .size also
+
+  Revision 1.19  1999/06/02 22:44:17  pierre
    * previous wrong log corrected
    * previous wrong log corrected
 
 
   Revision 1.18  1999/06/02 22:25:47  pierre
   Revision 1.18  1999/06/02 22:25:47  pierre

+ 20 - 9
compiler/symdef.inc

@@ -392,8 +392,9 @@
          has_rtti:=true;
          has_rtti:=true;
          getdatalabel(rtti_label);
          getdatalabel(rtti_label);
          write_child_rtti_data;
          write_child_rtti_data;
-         rttilist^.concat(new(pai_symbol,init(rtti_label)));
+         rttilist^.concat(new(pai_symbol,init(rtti_label,0)));
          write_rtti_data;
          write_rtti_data;
+         rttilist^.concat(new(pai_symbol_end,init(rtti_label)));
       end;
       end;
 
 
 
 
@@ -820,9 +821,9 @@
               { generate two constant for bounds }
               { generate two constant for bounds }
               getlabelnr(rangenr);
               getlabelnr(rangenr);
               if (cs_smartlink in aktmoduleswitches) then
               if (cs_smartlink in aktmoduleswitches) then
-                datasegment^.concat(new(pai_symbol,initname_global(getrangecheckstring)))
+                datasegment^.concat(new(pai_symbol,initname_global(getrangecheckstring,8)))
               else
               else
-                datasegment^.concat(new(pai_symbol,initname(getrangecheckstring)));
+                datasegment^.concat(new(pai_symbol,initname(getrangecheckstring,8)));
               datasegment^.concat(new(pai_const,init_32bit(min)));
               datasegment^.concat(new(pai_const,init_32bit(min)));
               datasegment^.concat(new(pai_const,init_32bit(max)));
               datasegment^.concat(new(pai_const,init_32bit(max)));
            end;
            end;
@@ -1014,15 +1015,21 @@
       end;
       end;
 
 
     procedure torddef.genrangecheck;
     procedure torddef.genrangecheck;
+      var
+        rangechecksize : longint;
       begin
       begin
          if rangenr=0 then
          if rangenr=0 then
            begin
            begin
+              if low<=high then
+               rangechecksize:=8
+              else
+               rangechecksize:=16;
               { generate two constant for bounds }
               { generate two constant for bounds }
               getlabelnr(rangenr);
               getlabelnr(rangenr);
               if (cs_smartlink in aktmoduleswitches) then
               if (cs_smartlink in aktmoduleswitches) then
-                datasegment^.concat(new(pai_symbol,initname_global(getrangecheckstring)))
+                datasegment^.concat(new(pai_symbol,initname_global(getrangecheckstring,rangechecksize)))
               else
               else
-                datasegment^.concat(new(pai_symbol,initname(getrangecheckstring)));
+                datasegment^.concat(new(pai_symbol,initname(getrangecheckstring,rangechecksize)));
               if low<=high then
               if low<=high then
                 begin
                 begin
                    datasegment^.concat(new(pai_const,init_32bit(low)));
                    datasegment^.concat(new(pai_const,init_32bit(low)));
@@ -1721,9 +1728,9 @@
               { generates the data for range checking }
               { generates the data for range checking }
               getlabelnr(rangenr);
               getlabelnr(rangenr);
               if (cs_smartlink in aktmoduleswitches) then
               if (cs_smartlink in aktmoduleswitches) then
-                datasegment^.concat(new(pai_symbol,initname_global(getrangecheckstring)))
+                datasegment^.concat(new(pai_symbol,initname_global(getrangecheckstring,8)))
               else
               else
-                datasegment^.concat(new(pai_symbol,initname(getrangecheckstring)));
+                datasegment^.concat(new(pai_symbol,initname(getrangecheckstring,8)));
               datasegment^.concat(new(pai_const,init_32bit(lowrange)));
               datasegment^.concat(new(pai_const,init_32bit(lowrange)));
               datasegment^.concat(new(pai_const,init_32bit(highrange)));
               datasegment^.concat(new(pai_const,init_32bit(highrange)));
            end;
            end;
@@ -3409,9 +3416,10 @@ Const local_symtable_index : longint = $8001;
          has_rtti:=true;
          has_rtti:=true;
          getdatalabel(rtti_label);
          getdatalabel(rtti_label);
          write_child_rtti_data;
          write_child_rtti_data;
-         rttilist^.concat(new(pai_symbol,initname_global(rtti_name)));
+         rttilist^.concat(new(pai_symbol,initname_global(rtti_name,0)));
          rttilist^.concat(new(pai_label,init(rtti_label)));
          rttilist^.concat(new(pai_label,init(rtti_label)));
          write_rtti_data;
          write_rtti_data;
+         rttilist^.concat(new(pai_symbol_end,initname(rtti_name)));
       end;
       end;
 
 
 
 
@@ -3522,7 +3530,10 @@ Const local_symtable_index : longint = $8001;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.135  1999-07-27 23:42:18  peter
+  Revision 1.136  1999-07-29 20:54:07  peter
+    * write .size also
+
+  Revision 1.135  1999/07/27 23:42:18  peter
     * indirect type referencing is now allowed
     * indirect type referencing is now allowed
 
 
   Revision 1.134  1999/07/23 23:07:03  peter
   Revision 1.134  1999/07/23 23:07:03  peter

+ 7 - 4
compiler/symsym.inc

@@ -1494,15 +1494,15 @@
 {$endif GDB}
 {$endif GDB}
         if owner^.symtabletype=globalsymtable then
         if owner^.symtabletype=globalsymtable then
           begin
           begin
-             curconstsegment^.concat(new(pai_symbol,initname_global(mangledname)));
+             curconstsegment^.concat(new(pai_symbol,initname_global(mangledname,getsize)));
           end
           end
         else
         else
           if owner^.symtabletype<>unitsymtable then
           if owner^.symtabletype<>unitsymtable then
             begin
             begin
               if (cs_smartlink in aktmoduleswitches) then
               if (cs_smartlink in aktmoduleswitches) then
-                curconstsegment^.concat(new(pai_symbol,initname_global(mangledname)))
+                curconstsegment^.concat(new(pai_symbol,initname_global(mangledname,getsize)))
               else
               else
-                curconstsegment^.concat(new(pai_symbol,initname(mangledname)));
+                curconstsegment^.concat(new(pai_symbol,initname(mangledname,getsize)));
             end;
             end;
         aktfilepos:=storefilepos;
         aktfilepos:=storefilepos;
       end;
       end;
@@ -2056,7 +2056,10 @@
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.104  1999-07-27 23:42:21  peter
+  Revision 1.105  1999-07-29 20:54:10  peter
+    * write .size also
+
+  Revision 1.104  1999/07/27 23:42:21  peter
     * indirect type referencing is now allowed
     * indirect type referencing is now allowed
 
 
   Revision 1.103  1999/07/24 15:12:59  michael
   Revision 1.103  1999/07/24 15:12:59  michael

+ 8 - 5
compiler/win_targ.pas

@@ -284,7 +284,7 @@ unit win_targ;
                       importssection^.concat(new(pai_stab_function_name,init(nil)));
                       importssection^.concat(new(pai_stab_function_name,init(nil)));
 {$EndIf GDB}
 {$EndIf GDB}
                      importssection^.concat(new(pai_align,init_op(4,$90)));
                      importssection^.concat(new(pai_align,init_op(4,$90)));
-                     importssection^.concat(new(pai_symbol,initname_global(hp2^.func^)));
+                     importssection^.concat(new(pai_symbol,initname_global(hp2^.func^,0)));
                      importssection^.concat(new(pai386,op_ref(A_JMP,S_NO,r)));
                      importssection^.concat(new(pai386,op_ref(A_JMP,S_NO,r)));
                    end;
                    end;
                   { create head link }
                   { create head link }
@@ -297,7 +297,7 @@ unit win_targ;
                   { add jump field to importsection }
                   { add jump field to importsection }
                   importssection^.concat(new(pai_section,init(sec_idata5)));
                   importssection^.concat(new(pai_section,init(sec_idata5)));
                   if hp2^.is_var then
                   if hp2^.is_var then
-                   importssection^.concat(new(pai_symbol,initname_global(hp2^.func^)))
+                   importssection^.concat(new(pai_symbol,initname_global(hp2^.func^,0)))
                   else
                   else
                    importssection^.concat(new(pai_label,init(lcode)));
                    importssection^.concat(new(pai_label,init(lcode)));
                    if hp2^.name^<>'' then
                    if hp2^.name^<>'' then
@@ -394,14 +394,14 @@ unit win_targ;
                       r^.symbol:=l4;
                       r^.symbol:=l4;
                       { place jump in codesegment }
                       { place jump in codesegment }
                       codesegment^.concat(new(pai_align,init_op(4,$90)));
                       codesegment^.concat(new(pai_align,init_op(4,$90)));
-                      codesegment^.concat(new(pai_symbol,initname_global(hp2^.func^)));
+                      codesegment^.concat(new(pai_symbol,initname_global(hp2^.func^,0)));
                       codesegment^.concat(new(pai386,op_ref(A_JMP,S_NO,r)));
                       codesegment^.concat(new(pai386,op_ref(A_JMP,S_NO,r)));
                       { add jump field to importsection }
                       { add jump field to importsection }
                       importssection^.concat(new(pai_label,init(l4)));
                       importssection^.concat(new(pai_label,init(l4)));
                     end
                     end
                    else
                    else
                     begin
                     begin
-                      importssection^.concat(new(pai_symbol,initname_global(hp2^.func^)));
+                      importssection^.concat(new(pai_symbol,initname_global(hp2^.func^,0)));
                     end;
                     end;
                    importssection^.concat(new(pai_const_symbol,init_rva(hp2^.lab)));
                    importssection^.concat(new(pai_const_symbol,init_rva(hp2^.lab)));
                    hp2:=pimported_item(hp2^.next);
                    hp2:=pimported_item(hp2^.next);
@@ -728,7 +728,10 @@ unit win_targ;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.29  1999-07-22 16:12:28  peter
+  Revision 1.30  1999-07-29 20:54:11  peter
+    * write .size also
+
+  Revision 1.29  1999/07/22 16:12:28  peter
     * merged
     * merged
 
 
   Revision 1.28  1999/07/18 10:20:03  florian
   Revision 1.28  1999/07/18 10:20:03  florian