Skip to content

Commit f85c584

Browse files
committed
Cherry pick from is-6_3_3: Stop stripping relocations because it breaks ASLR. Remove old comments. Update whatsnew.
1 parent 8ba4fcc commit f85c584

7 files changed

Lines changed: 8 additions & 10 deletions

File tree

ISHelp/isetup.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5523,7 +5523,7 @@ ArchitecturesInstallIn64BitMode=x64compatible
55235523
<setupvalid><link topic="yesnonotes"><tt>yes</tt> or <tt>no</tt></link></setupvalid>
55245524
<setupdefault><tt>yes</tt></setupdefault>
55255525
<body>
5526-
<p>Specifies whether the compiler should set the "Terminal Services aware" flag in the headers of the Setup and Uninstall programs. This feature is new to version 5.1.7 and defaults to <tt>yes</tt>; previous versions never set the flag.</p>
5526+
<p>Specifies whether the compiler should set the "Terminal Services aware" flag in the headers of the Setup and Uninstall programs.</p>
55275527
<p>Most importantly, the "Terminal Services aware" flag affects the behavior of the {win} constant (and <link topic="isxfunc_GetWinDir">GetWinDir</link> support function) on servers with Terminal Services installed in application mode.</p>
55285528
<p>When the flag is set, {win} will consistently return the system's real Windows directory, typically "C:\WINDOWS", just as on systems that do not have Terminal Services installed.</p>
55295529
<p>When the flag is not set, Windows runs the program in compatibility mode, where {win} may return either the real Windows directory or a user-specific Windows directory, such as "C:\Documents and Settings\&lt;user name&gt;\WINDOWS". Which one you get depends on the name of the program's EXE file and how it is launched. If the program is named setup.exe or install.exe, or if it is launched from the <i>Add/Remove Programs</i> Control Panel applet, then Windows will put the system in "install mode", which effectively makes the program (and all other programs running in the session) behave as if the "Terminal Services aware" flag were set. Otherwise, the program is treated as a legacy application and is given a private Windows directory. (This is true even if the user running the program has full administrative privileges.)</p>
@@ -5535,7 +5535,7 @@ ArchitecturesInstallIn64BitMode=x64compatible
55355535
<setupvalid><link topic="yesnonotes"><tt>yes</tt> or <tt>no</tt></link></setupvalid>
55365536
<setupdefault><tt>yes</tt></setupdefault>
55375537
<body>
5538-
<p>Specifies whether the compiler should set the "NX Compatible" flag in the headers of the Setup and Uninstall programs to mark them compatible with data execution prevention (DEP). This feature is new to version 5.5.7 and defaults to <tt>yes</tt>; previous versions never set the flag.</p>
5538+
<p>Specifies whether the compiler should set the "NX Compatible" flag in the headers of the Setup and Uninstall programs to mark them compatible with data execution prevention (DEP).</p>
55395539
<p>Setting this to <tt>no</tt> might be needed if you're using a buggy third-party DLL from [Code].</p>
55405540
</body>
55415541
</setuptopic>
@@ -5544,7 +5544,7 @@ ArchitecturesInstallIn64BitMode=x64compatible
55445544
<setupvalid><link topic="yesnonotes"><tt>yes</tt> or <tt>no</tt></link></setupvalid>
55455545
<setupdefault><tt>yes</tt></setupdefault>
55465546
<body>
5547-
<p>Specifies whether the compiler should set the "Dynamic Base" flag in the headers of the Setup and Uninstall programs. This feature is new to version 5.5.7 and defaults to <tt>yes</tt>; previous versions never set the flag.</p>
5547+
<p>Specifies whether the compiler should set the "Dynamic Base" flag in the headers of the Setup and Uninstall programs.</p>
55485548
</body>
55495549
</setuptopic>
55505550

Projects/Compil32.dpr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ uses
6363
IsscintInt in 'Src\Compil32\IsscintInt.pas',
6464
ScriptFunc in 'Src\ScriptFunc.pas';
6565

66-
{$SetPEFlags IMAGE_FILE_RELOCS_STRIPPED}
6766
{$SETPEOSVERSION 6.1}
6867
{$SETPESUBSYSVERSION 6.1}
6968
{$WEAKLINKRTTI ON}

Projects/ISCC.dpr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ uses
2727
CompTypes in 'Src\CompTypes.pas',
2828
Int64Em in 'Src\Int64Em.pas';
2929

30-
{$SetPEFlags IMAGE_FILE_RELOCS_STRIPPED}
3130
{$SETPEOSVERSION 6.1}
3231
{$SETPESUBSYSVERSION 6.1}
3332
{$WEAKLINKRTTI ON}

Projects/Setup.dpr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ uses
8989
DotNetVersion in 'Src\DotNetVersion.pas',
9090
NewUxTheme in '..\Components\NewUxTheme.pas';
9191

92-
{$SetPEFlags IMAGE_FILE_RELOCS_STRIPPED}
9392
{$SETPEOSVERSION 6.1}
9493
{$SETPESUBSYSVERSION 6.1}
9594
{$WEAKLINKRTTI ON}

Projects/SetupLdr.dpr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ uses
3232
SetupTypes in 'Src\SetupTypes.pas',
3333
VerInfo in 'Src\VerInfo.pas';
3434

35-
{$SetPEFlags IMAGE_FILE_RELOCS_STRIPPED}
3635
{$SETPEOSVERSION 6.1}
3736
{$SETPESUBSYSVERSION 6.1}
3837
{$WEAKLINKRTTI ON}

Projects/Src/ISCmplr/CompExeUpdate.pas

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ procedure UpdateSetupPEHeaderFields(const F: TCustomFile;
8585
DllChars := DllChars or IMAGE_DLLCHARACTERISTICS_NX_COMPAT
8686
else
8787
DllChars := DllChars and not IMAGE_DLLCHARACTERISTICS_NX_COMPAT;
88-
{ Note: because we stripped relocations from Setup(Ldr).e32 during
89-
compilation IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE won't actually
90-
enable ASLR, but allow setting it anyway to make checkers happy. }
9188
if IsASLRCompatible then
9289
DllChars := DllChars or IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE
9390
else

whatsnew.htm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@
8383

8484
<p>Contributions via <a href="https://github.com/jrsoftware/issrc" target="_blank">GitHub</a>: Thanks to Sergii Leonov, John Stevenson, and jogo- for their contributions!</p>
8585

86+
<p><a name="6.3.3"></a><span class="ver">6.3.3 </span><span class="date">(2024-07-12)</span></p>
87+
<ul>
88+
<li>Improved support for ASLR.</li>
89+
</ul>
90+
8691
<p><a name="6.3.2"></a><span class="ver">6.3.2 </span><span class="date">(2024-06-28)</span></p>
8792
<ul>
8893
<li>Pascal Scripting change: Fixed support function <tt>TStream.Seek</tt>.</li>

0 commit comments

Comments
 (0)