From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Thu, 2 Feb 2023 16:02:34 +0000 (+0200) Subject: Pass -pie and -no-pie to the linker (#81533) X-Git-Tag: accepted/tizen/unified/riscv/20231226.055536~4267 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=873775b42431bf27a9ae69633864e5290443c29b;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Pass -pie and -no-pie to the linker (#81533) * Pass -pie and -no-pie to the linker When `PositionIndependentExecutable` is `false`, we need to pass `-no-pie` to the linker. Otherwise, we need to pass `-pie` to the linker with `-Wl` because we are not compiling the code at this stage (only linking the objects). * Add -pie for non-pie .o (in CentOS 7) --- diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets index eb9f333..aac111f 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets @@ -134,7 +134,8 @@ The .NET Foundation licenses this file to you under the MIT license. - + +