Skip to content

Commit 911409c

Browse files
Explain lack of check for static when setting an image-base (-static implies non-pie on PS5)
1 parent ee87f59 commit 911409c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/lib/Driver/ToolChains/PS4CPU.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@ void tools::PS5cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA,
302302
if (Shared)
303303
CmdArgs.push_back("--shared");
304304

305+
// Provide a base address for non-PIE executables. This includes cases where
306+
// -static is supplied without -pie.
305307
if (!Relocatable && !Shared && !PIE)
306308
CmdArgs.push_back("--image-base=0x400000");
307309

0 commit comments

Comments
 (0)