* introduce and use support_rodata define in the compiler

This commit is contained in:
florian 2026-02-08 10:49:50 +01:00
parent 35d9f304b1
commit 4ce0b7932a
3 changed files with 12 additions and 6 deletions

View File

@ -224,11 +224,11 @@ implementation
{ vtable for a class called Window: }
{ .section .data.rel.ro._ZTV6Window,"awG",@progbits,_ZTV6Window,comdat }
{ TODO: .data.ro not yet working}
{$if defined(arm) or defined(aarch64) or defined(riscv64) or defined(powerpc) or defined(x86_64) or defined(loongarch64)}
{$if defined(support_rodata)}
'.rodata',
{$else defined(arm) or defined(aarch64) or defined(riscv64) or defined(powerpc) or defined(x86_64) or defined(loongarch64)}
{$else defined(support_rodata)}
'.data',
{$endif defined(arm) or defined(aarch64) or defined(riscv64) or defined(powerpc) or defined(x86_64) or defined(loongarch64)}
{$endif defined(support_rodata)}
'.rodata',
'.bss',
'.threadvar',

View File

@ -142,6 +142,7 @@
{$define SUPPORT_GET_FRAME}
{$define cpucapabilities}
{$define fpucapabilities}
{$define support_rodata}
{$endif x86_64}
{$ifdef sparc}
@ -184,6 +185,7 @@
{$define SUPPORT_SAFECALL}
{$define SUPPORT_GET_FRAME}
{$define CPU_BC_HAS_SIZE_LIMIT}
{$define support_rodata}
{$endif powerpc}
{$ifdef powerpc64}
@ -214,6 +216,7 @@
{$define fpucapabilities}
{$define SUPPORT_SAFECALL}
{$define SUPPORT_GET_FRAME}
{$define support_rodata}
{ default to armel }
{$if not(defined(CPUARM)) and not(defined(CPUARMEB)) and not(defined(FPC_OARM)) and not(defined(FPC_ARMEB)) and not(defined(FPC_ARMHF))}
{$define FPC_ARMEL}
@ -342,6 +345,7 @@
{$define SUPPORT_SAFECALL}
{$define cpucapabilities}
{$define fpucapabilities}
{$define support_rodata}
{$endif aarch64}
{$ifdef riscv32}
@ -385,6 +389,7 @@
{$define cpucapabilities}
{$define cpurequiresproperalignment}
{$define SUPPORT_SAFECALL}
{$define support_rodata}
{$endif riscv64}
{$ifdef xtensa}
@ -408,6 +413,7 @@
{$define cputargethasfixedstack}
{$define cpucapabilities}
{$define SUPPORT_SAFECALL}
{$define support_rodata}
{$endif loongarch64}
{ Stabs is not officially supported on 64 bit targets by gdb, except on Mac OS X

View File

@ -959,11 +959,11 @@ implementation
{ vtable for a class called Window: }
{ .section .data.rel.ro._ZTV6Window,"awG",@progbits,_ZTV6Window,comdat }
{ TODO: .data.ro not yet working}
{$if defined(arm) or defined(riscv64) or defined(powerpc)}
{$if defined(support_rodata)}
'.rodata',
{$else defined(arm) or defined(riscv64) or defined(powerpc)}
{$else defined(support_rodata)}
'.data',
{$endif defined(arm) or defined(riscv64) or defined(powerpc)}
{$endif defined(support_rodata)}
'.rodata',
'.bss',
'.tbss',