From 3d63b1a2b2e812d04fe312fc815f04431b7febfd Mon Sep 17 00:00:00 2001 From: sergei Date: Thu, 11 Oct 2012 19:26:40 +0000 Subject: [PATCH] + Added a flag allowing a section to be written into both .dbg and executable files. This is needed at least for ELF SHT_NOTE sections. git-svn-id: trunk@22614 - --- compiler/ogbase.pas | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/compiler/ogbase.pas b/compiler/ogbase.pas index 1bf6264bcb..96297334e2 100644 --- a/compiler/ogbase.pas +++ b/compiler/ogbase.pas @@ -133,7 +133,9 @@ interface { Contains only strings } oso_strings, { Ignore this section } - oso_disabled + oso_disabled, + { Must be cloned when writing separate debug file } + oso_debug_copy ); TObjSectionOptions = set of TObjSectionOption; @@ -2043,7 +2045,7 @@ implementation begin { don't write normal section if writing only debug info } if (ExeWriteMode=ewm_dbgonly) and - not(oso_debug in exesec.SecOptions) then + (exesec.SecOptions*[oso_debug,oso_debug_copy]=[]) then exit; if (oso_Data in exesec.SecOptions) then @@ -3115,7 +3117,7 @@ implementation exesec:=TExeSection(ExeSectionList[j]); { don't write normal section if writing only debug info } if (ExeWriteMode=ewm_dbgonly) and - not(oso_debug in exesec.SecOptions) then + (exesec.SecOptions*[oso_debug,oso_debug_copy]=[]) then continue; if oso_data in exesec.SecOptions then