clang currently lacks PIE support on Solaris. This patch fixes this, linking with crtbeginS.o and crtendS.o for -pie and -shared.
Tested on amd64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu.
Differential D158206
[Driver] Add PIE support on Solaris ro on Aug 17 2023, 12:37 PM. Authored by
Details
clang currently lacks PIE support on Solaris. This patch fixes this, linking with crtbeginS.o and crtendS.o for -pie and -shared. Tested on amd64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu.
Diff Detail
Event TimelineComment Actions
I think this patch should make this change, so that the change is correct on itself. Comment Actions Ok, done. I'll update with the merge patch once another round of testing has finished.
|
On Linux, clang -r -static also disable the linker option -pie.
-static-pie is handled as a special case which also disables the regular -pie code path.