* Changed section for ansi/wide/unicodestring constants, resourcestrings (content only) and dataconstnodes from sec_rodata to sec_rodata_norel, because they never contain relocations.

git-svn-id: trunk@23017 -
This commit is contained in:
sergei 2012-11-18 17:00:18 +00:00
parent e8580b5d9c
commit afd34cf9d5
3 changed files with 5 additions and 5 deletions

View File

@ -62,7 +62,7 @@ uses
if NewSection then
begin
maybe_new_object_file(list);
new_section(list,sec_rodata,result.lab.name,const_align(sizeof(pint)));
new_section(list,sec_rodata_norel,result.lab.name,const_align(sizeof(pint)));
end;
{ put label before header on Darwin, because there the linker considers
a global symbol to be the start of a new subsection }
@ -105,7 +105,7 @@ uses
current_asmdata.getdatalabel(result.lab);
result.ofs:=0;
maybe_new_object_file(list);
new_section(list,sec_rodata,result.lab.name,const_align(sizeof(pint)));
new_section(list,sec_rodata_norel,result.lab.name,const_align(sizeof(pint)));
strlength := getlengthwidestring(pcompilerwidestring(data));
if Winlike then
begin

View File

@ -163,7 +163,7 @@ uses
R:=TResourceStringItem(List.First);
while assigned(R) do
begin
new_section(current_asmdata.asmlists[al_const],sec_rodata,make_mangledname('RESSTR',current_module.localsymtable,'d_'+r.name),sizeof(pint));
new_section(current_asmdata.asmlists[al_const],sec_rodata_norel,make_mangledname('RESSTR',current_module.localsymtable,'d_'+r.name),sizeof(pint));
{ Write default value }
if assigned(R.value) and (R.len<>0) then
valuelab:=emit_ansistring_const(current_asmdata.asmlists[al_const],R.Value,R.Len,getansistringcodepage,False)

View File

@ -81,7 +81,7 @@ implementation
{*****************************************************************************
TCGREALCONSTNODE
TCGDATACONSTNODE
*****************************************************************************}
procedure tcgdataconstnode.pass_generate_code;
@ -93,7 +93,7 @@ implementation
location_reset_ref(location,LOC_CREFERENCE,OS_NO,const_align(maxalign));
current_asmdata.getdatalabel(l);
maybe_new_object_file(current_asmdata.asmlists[al_typedconsts]);
new_section(current_asmdata.asmlists[al_typedconsts],sec_rodata,l.name,const_align(maxalign));
new_section(current_asmdata.asmlists[al_typedconsts],sec_rodata_norel,l.name,const_align(maxalign));
current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(l));
data.seek(0);
for i:=0 to data.size-1 do