[clang] [PS5][Driver] Pass layout metrics to the linker (PR #114435)

Edd Dawson via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 1 02:53:47 PDT 2024


================
@@ -295,6 +302,9 @@ void tools::PS5cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA,
   if (Shared)
     CmdArgs.push_back("--shared");
 
+  if (!Relocatable && !Shared && !PIE)
----------------
playstation-edd wrote:

The intention is to supply a base for non-PIE executables, which by default includes `-static`. I'll add a comment to ensure it doesn't appear accidental.

We have a distinct linker script for `-static` executables (which isn't visible here just yet, but soon). That script currently hardcodes a base address, but with this change it will be possible to remove that and allow the base to be overridden from the command line, while still having the same default.

https://github.com/llvm/llvm-project/pull/114435


More information about the cfe-commits mailing list