Browse Source

* more compilation fixes

git-svn-id: trunk@39350 -
florian 7 years ago
parent
commit
6a2cb0bbbd
3 changed files with 9 additions and 0 deletions
  1. 1 0
      compiler/dbgstabs.pas
  2. 5 0
      compiler/ogomf.pas
  3. 3 0
      compiler/owomflib.pas

+ 1 - 0
compiler/dbgstabs.pas

@@ -250,6 +250,7 @@ implementation
       varcounter:=0;
       varcounter:=0;
       varptr:=@varvaluedata[0];
       varptr:=@varvaluedata[0];
       varvalues[0]:=nil;
       varvalues[0]:=nil;
+      result:='';
       while i<=length(s) do
       while i<=length(s) do
         begin
         begin
           if (s[i]='$') and (i<length(s)) then
           if (s[i]='$') and (i<length(s)) then

+ 5 - 0
compiler/ogomf.pas

@@ -774,6 +774,7 @@ implementation
         seglist: TSegmentList;
         seglist: TSegmentList;
         I: Integer;
         I: Integer;
       begin
       begin
+        seglist:=nil;
         g:=TOmfRecord_GRPDEF.Create;
         g:=TOmfRecord_GRPDEF.Create;
         Groups.Add(group.Name,g);
         Groups.Add(group.Name,g);
         g.GroupNameIndex:=LNames.Add(group.Name);
         g.GroupNameIndex:=LNames.Add(group.Name);
@@ -937,6 +938,7 @@ implementation
         RawRecord: TOmfRawRecord;
         RawRecord: TOmfRawRecord;
         PubDefRec: TOmfRecord_PUBDEF;
         PubDefRec: TOmfRecord_PUBDEF;
       begin
       begin
+        PubNamesForSection:=nil;
         RawRecord:=TOmfRawRecord.Create;
         RawRecord:=TOmfRawRecord.Create;
         SetLength(PubNamesForSection,Data.ObjSectionList.Count);
         SetLength(PubNamesForSection,Data.ObjSectionList.Count);
         for i:=0 to Data.ObjSectionList.Count-1 do
         for i:=0 to Data.ObjSectionList.Count-1 do
@@ -2718,6 +2720,9 @@ implementation
         ObjSec: TOmfObjSection;
         ObjSec: TOmfObjSection;
         tis_trailer: TTISTrailer;
         tis_trailer: TTISTrailer;
       begin
       begin
+        debugsections:=nil;
+        elfsechdrs:=nil;
+        
         { mark the offset of the start of the ELF image }
         { mark the offset of the start of the ELF image }
         elf_start_pos:=Writer.Size;
         elf_start_pos:=Writer.Size;
 
 

+ 3 - 0
compiler/owomflib.pas

@@ -399,6 +399,7 @@ implementation
         store_at: Integer;
         store_at: Integer;
         PageNum: Word;
         PageNum: Word;
       begin
       begin
+        blocks:=nil;
         SetLength(blocks,nblocks);
         SetLength(blocks,nblocks);
         for i:=0 to nblocks-1 do
         for i:=0 to nblocks-1 do
           begin
           begin
@@ -500,6 +501,8 @@ implementation
       name: string;
       name: string;
       PageNum: Integer;
       PageNum: Integer;
     begin
     begin
+      blocks:=nil;
+      name:='';
       seek(DictionaryOffset);
       seek(DictionaryOffset);
       SetLength(blocks,DictionarySizeInBlocks);
       SetLength(blocks,DictionarySizeInBlocks);
       read(blocks[0],DictionarySizeInBlocks*SizeOf(TBlock));
       read(blocks[0],DictionarySizeInBlocks*SizeOf(TBlock));