浏览代码

* use the indirect start and end symbols for the resource string table (affects both the compiler and the RTL)

git-svn-id: trunk@34185 -
svenbarth 9 年之前
父节点
当前提交
947c876ba3
共有 2 个文件被更改,包括 12 次插入11 次删除
  1. 2 2
      compiler/ngenutil.pas
  2. 10 9
      rtl/objpas/objpas.pp

+ 2 - 2
compiler/ngenutil.pas

@@ -1250,11 +1250,11 @@ implementation
           If (hp.flags and uf_has_resourcestrings)=uf_has_resourcestrings then
             begin
               tcb.emit_tai(Tai_const.Create_sym(
-                ctai_typedconstbuilder.get_vectorized_dead_strip_section_symbol_start('RESSTR',hp.localsymtable,[])),
+                ctai_typedconstbuilder.get_vectorized_dead_strip_section_symbol_start('RESSTR',hp.localsymtable,[tcdssso_use_indirect])),
                 voidpointertype
               );
               tcb.emit_tai(Tai_const.Create_sym(
-                ctai_typedconstbuilder.get_vectorized_dead_strip_section_symbol_end('RESSTR',hp.localsymtable,[])),
+                ctai_typedconstbuilder.get_vectorized_dead_strip_section_symbol_end('RESSTR',hp.localsymtable,[tcdssso_use_indirect])),
                 voidpointertype
               );
               inc(count);

+ 10 - 9
rtl/objpas/objpas.pp

@@ -313,11 +313,12 @@ begin
 end;
 
 Type
+   PPResourceStringRecord = ^PResourceStringRecord;
    TResourceStringTableList = Packed Record
      Count : sizeint;
      Tables : Array[{$ifdef cpu16}Byte{$else cpu16}Word{$endif cpu16}] of record
        TableStart,
-       TableEnd   : PResourceStringRecord;
+       TableEnd   : {$ifdef ver3_0}PResourceStringRecord{$else}PPResourceStringRecord{$endif};
      end;
    end;
    PResourceStringTableList = ^TResourceStringTableList;
@@ -369,10 +370,10 @@ begin
     begin
       For i:=0 to Count-1 do
         begin
-          ResStr:=Tables[I].TableStart;
+          ResStr:=Tables[I].TableStart{$ifndef VER3_0}^{$endif};
           { Skip first entry (name of the Unit) }
           inc(ResStr);
-          while ResStr<Tables[I].TableEnd do
+          while ResStr<Tables[I].TableEnd{$ifndef VER3_0}^{$endif} do
             begin
               s:=SetFunction(ResStr^.Name,ResStr^.DefaultValue,Longint(ResStr^.HashValue),arg);
               if s<>'' then
@@ -399,12 +400,12 @@ begin
       UpUnitName:=UpCase(UnitName);
       For i:=0 to Count-1 do
         begin
-          ResStr:=Tables[I].TableStart;
+          ResStr:=Tables[I].TableStart{$ifndef VER3_0}^{$endif};
           { Check name of the Unit }
           if ResStr^.Name<>UpUnitName then
             continue;
           inc(ResStr);
-          while ResStr<Tables[I].TableEnd do
+          while ResStr<Tables[I].TableEnd{$ifndef VER3_0}^{$endif} do
             begin
               s:=SetFunction(ResStr^.Name,ResStr^.DefaultValue,Longint(ResStr^.HashValue),arg);
               if s<>'' then
@@ -430,10 +431,10 @@ begin
     begin
       For i:=0 to Count-1 do
         begin
-          ResStr:=Tables[I].TableStart;
+          ResStr:=Tables[I].TableStart{$ifndef VER3_0}^{$endif};
           { Skip first entry (name of the Unit) }
           inc(ResStr);
-          while ResStr<Tables[I].TableEnd do
+          while ResStr<Tables[I].TableEnd{$ifndef VER3_0}^{$endif} do
             begin
               ResStr^.CurrentValue:=ResStr^.DefaultValue;
               inc(ResStr);
@@ -452,10 +453,10 @@ begin
     begin
       For i:=0 to Count-1 do
         begin
-          ResStr:=Tables[I].TableStart;
+          ResStr:=Tables[I].TableStart{$ifndef VER3_0}^{$endif};
           { Skip first entry (name of the Unit) }
           inc(ResStr);
-          while ResStr<Tables[I].TableEnd do
+          while ResStr<Tables[I].TableEnd{$ifndef VER3_0}^{$endif} do
             begin
               ResStr^.CurrentValue:='';
               inc(ResStr);