|
@@ -253,12 +253,13 @@ implementation
|
|
{ not relocated properly on e.g. linux/ppc64. g++ generates there for a }
|
|
{ not relocated properly on e.g. linux/ppc64. g++ generates there for a }
|
|
{ vtable for a class called Window: }
|
|
{ vtable for a class called Window: }
|
|
{ .section .data.rel.ro._ZTV6Window,"awG",@progbits,_ZTV6Window,comdat }
|
|
{ .section .data.rel.ro._ZTV6Window,"awG",@progbits,_ZTV6Window,comdat }
|
|
-{$warning TODO .rodata not yet working}
|
|
|
|
|
|
+{$warning TODO .data.ro not yet working}
|
|
{$if defined(arm) or defined(powerpc)}
|
|
{$if defined(arm) or defined(powerpc)}
|
|
'.rodata',
|
|
'.rodata',
|
|
{$else arm}
|
|
{$else arm}
|
|
'.data',
|
|
'.data',
|
|
{$endif arm}
|
|
{$endif arm}
|
|
|
|
+ '.rodata',
|
|
'.bss',
|
|
'.bss',
|
|
'.threadvar',
|
|
'.threadvar',
|
|
'.pdata',
|
|
'.pdata',
|
|
@@ -277,6 +278,7 @@ implementation
|
|
'.text',
|
|
'.text',
|
|
'.data.rel',
|
|
'.data.rel',
|
|
'.data.rel',
|
|
'.data.rel',
|
|
|
|
+ '.data.rel',
|
|
'.bss',
|
|
'.bss',
|
|
'.threadvar',
|
|
'.threadvar',
|
|
'.pdata',
|
|
'.pdata',
|
|
@@ -600,12 +602,12 @@ implementation
|
|
begin
|
|
begin
|
|
if (target_info.system in systems_darwin) then
|
|
if (target_info.system in systems_darwin) then
|
|
begin
|
|
begin
|
|
- {On Mac OS X you can't have common symbols in a shared
|
|
|
|
- library, since those are in the TEXT section and the text section is
|
|
|
|
- read-only in shared libraries (so it can be shared among different
|
|
|
|
- processes). The alternate code creates some kind of common symbols in
|
|
|
|
- the data segment. The generic code no longer uses common symbols, but
|
|
|
|
- this doesn't work on Mac OS X as well.}
|
|
|
|
|
|
+ { On Mac OS X you can't have common symbols in a shared library
|
|
|
|
+ since those are in the TEXT section and the text section is
|
|
|
|
+ read-only in shared libraries (so it can be shared among different
|
|
|
|
+ processes). The alternate code creates some kind of common symbols
|
|
|
|
+ in the data segment.
|
|
|
|
+ }
|
|
if tai_datablock(hp).is_global then
|
|
if tai_datablock(hp).is_global then
|
|
begin
|
|
begin
|
|
asmwrite('.globl ');
|
|
asmwrite('.globl ');
|
|
@@ -733,7 +735,7 @@ implementation
|
|
{ Values with symbols are written on a single line to improve
|
|
{ Values with symbols are written on a single line to improve
|
|
reading of the .s file (PFV) }
|
|
reading of the .s file (PFV) }
|
|
if assigned(tai_const(hp).sym) or
|
|
if assigned(tai_const(hp).sym) or
|
|
- not(CurrSecType in [sec_data,sec_rodata]) or
|
|
|
|
|
|
+ not(CurrSecType in [sec_data,sec_rodata,sec_rodata_norel]) or
|
|
(l>line_length) or
|
|
(l>line_length) or
|
|
(hp.next=nil) or
|
|
(hp.next=nil) or
|
|
(tai(hp.next).typ<>ait_const) or
|
|
(tai(hp.next).typ<>ait_const) or
|
|
@@ -1116,6 +1118,11 @@ implementation
|
|
exit;
|
|
exit;
|
|
end;
|
|
end;
|
|
sec_rodata:
|
|
sec_rodata:
|
|
|
|
+ begin
|
|
|
|
+ result := '.const_data';
|
|
|
|
+ exit;
|
|
|
|
+ end;
|
|
|
|
+ sec_rodata_norel:
|
|
begin
|
|
begin
|
|
result := '.const';
|
|
result := '.const';
|
|
exit;
|
|
exit;
|
|
@@ -1142,6 +1149,7 @@ implementation
|
|
sec_code,
|
|
sec_code,
|
|
sec_data,
|
|
sec_data,
|
|
sec_data (* sec_rodata *),
|
|
sec_data (* sec_rodata *),
|
|
|
|
+ sec_data (* sec_rodata_norel *),
|
|
sec_bss,
|
|
sec_bss,
|
|
sec_data (* sec_threadvar *),
|
|
sec_data (* sec_threadvar *),
|
|
{ used for wince exception handling }
|
|
{ used for wince exception handling }
|