mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-25 18:38:59 +02:00
* Always generate CFI-information. During linking it can be omitted when
no debug-information is requested. On Linux this needed a change in the linker-script. On Windows it already works as desired. Other targets may need some adjustments as well.
This commit is contained in:
parent
776c39dc0a
commit
3385ce92a2
@ -238,10 +238,12 @@ implementation
|
|||||||
inherited;
|
inherited;
|
||||||
if tf_use_psabieh in target_info.flags then
|
if tf_use_psabieh in target_info.flags then
|
||||||
datatype:=dt_eh_frame
|
datatype:=dt_eh_frame
|
||||||
else if cs_debuginfo in current_settings.moduleswitches then
|
|
||||||
datatype:=dt_debug
|
|
||||||
else
|
else
|
||||||
datatype:=dt_none;
|
{ The CFI-information is always generated, regardless of the debug
|
||||||
|
settings. This way the CFI-information for units is always available
|
||||||
|
and during linking it can be omitted or not, based on the debug
|
||||||
|
settings. }
|
||||||
|
datatype:=dt_debug;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
|
@ -715,6 +715,8 @@ begin
|
|||||||
add(' {');
|
add(' {');
|
||||||
add(' KEEP (*(.fpc .fpc.n_version .fpc.n_links))');
|
add(' KEEP (*(.fpc .fpc.n_version .fpc.n_links))');
|
||||||
add(' }');
|
add(' }');
|
||||||
|
if not ((cs_debuginfo in current_settings.moduleswitches)) then
|
||||||
|
add(' /DISCARD/ : {*(.debug_frame)}');
|
||||||
add(' .threadvar : { *(.threadvar .threadvar.* .gnu.linkonce.tv.*) }');
|
add(' .threadvar : { *(.threadvar .threadvar.* .gnu.linkonce.tv.*) }');
|
||||||
add('}');
|
add('}');
|
||||||
{ this "INSERT" means "merge into the original linker script, even if
|
{ this "INSERT" means "merge into the original linker script, even if
|
||||||
|
Loading…
Reference in New Issue
Block a user