mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 13:50:29 +02:00
* 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:
parent
e8580b5d9c
commit
afd34cf9d5
@ -62,7 +62,7 @@ uses
|
|||||||
if NewSection then
|
if NewSection then
|
||||||
begin
|
begin
|
||||||
maybe_new_object_file(list);
|
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;
|
end;
|
||||||
{ put label before header on Darwin, because there the linker considers
|
{ put label before header on Darwin, because there the linker considers
|
||||||
a global symbol to be the start of a new subsection }
|
a global symbol to be the start of a new subsection }
|
||||||
@ -105,7 +105,7 @@ uses
|
|||||||
current_asmdata.getdatalabel(result.lab);
|
current_asmdata.getdatalabel(result.lab);
|
||||||
result.ofs:=0;
|
result.ofs:=0;
|
||||||
maybe_new_object_file(list);
|
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));
|
strlength := getlengthwidestring(pcompilerwidestring(data));
|
||||||
if Winlike then
|
if Winlike then
|
||||||
begin
|
begin
|
||||||
|
@ -163,7 +163,7 @@ uses
|
|||||||
R:=TResourceStringItem(List.First);
|
R:=TResourceStringItem(List.First);
|
||||||
while assigned(R) do
|
while assigned(R) do
|
||||||
begin
|
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 }
|
{ Write default value }
|
||||||
if assigned(R.value) and (R.len<>0) then
|
if assigned(R.value) and (R.len<>0) then
|
||||||
valuelab:=emit_ansistring_const(current_asmdata.asmlists[al_const],R.Value,R.Len,getansistringcodepage,False)
|
valuelab:=emit_ansistring_const(current_asmdata.asmlists[al_const],R.Value,R.Len,getansistringcodepage,False)
|
||||||
|
@ -81,7 +81,7 @@ implementation
|
|||||||
|
|
||||||
|
|
||||||
{*****************************************************************************
|
{*****************************************************************************
|
||||||
TCGREALCONSTNODE
|
TCGDATACONSTNODE
|
||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
|
|
||||||
procedure tcgdataconstnode.pass_generate_code;
|
procedure tcgdataconstnode.pass_generate_code;
|
||||||
@ -93,7 +93,7 @@ implementation
|
|||||||
location_reset_ref(location,LOC_CREFERENCE,OS_NO,const_align(maxalign));
|
location_reset_ref(location,LOC_CREFERENCE,OS_NO,const_align(maxalign));
|
||||||
current_asmdata.getdatalabel(l);
|
current_asmdata.getdatalabel(l);
|
||||||
maybe_new_object_file(current_asmdata.asmlists[al_typedconsts]);
|
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));
|
current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(l));
|
||||||
data.seek(0);
|
data.seek(0);
|
||||||
for i:=0 to data.size-1 do
|
for i:=0 to data.size-1 do
|
||||||
|
Loading…
Reference in New Issue
Block a user