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

git-svn-id: trunk@34185 -
This commit is contained in:
svenbarth 2016-07-22 16:01:39 +00:00
parent 90a1099c5e
commit 947c876ba3
2 changed files with 12 additions and 11 deletions

View File

@ -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);

View File

@ -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);