From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1880) id 4E7BE385AC24; Tue, 6 Sep 2022 12:14:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E7BE385AC24 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662466477; bh=EoYchr9y5KmR6uwWKJLfA4WyrLvxGUK+R/C9yHpp6J8=; h=From:To:Subject:Date:From; b=oj5pDh+j8Zxc+v2LOs4/0s8SJYJ3RdS62LV+g+WIkc/vlgveNhxiWezh/g8Y0cZcS ah3oNRX10NeMT3TVmGiGEN0V1speNUzqdKcCmyEmsQl7kpPA4V/zJMNG8dEgCIEp5p Hi7c5V0yGDa++qjsr6nlIJ3jOcSc57EjdPfuq63g= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Max Filippov To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-2499] xtensa: gcc: add static PIE support X-Act-Checkin: gcc X-Git-Author: Max Filippov X-Git-Refname: refs/heads/master X-Git-Oldrev: f5dc9da0a97734ab68a4af34875640ed1ca0c7d1 X-Git-Newrev: 9e0c2696724d4d004ea189a69f15781c7baa68e1 Message-Id: <20220906121437.4E7BE385AC24@sourceware.org> Date: Tue, 6 Sep 2022 12:14:37 +0000 (GMT) List-Id: https://gcc.gnu.org/g:9e0c2696724d4d004ea189a69f15781c7baa68e1 commit r13-2499-g9e0c2696724d4d004ea189a69f15781c7baa68e1 Author: Max Filippov Date: Fri Aug 12 21:02:15 2022 -0700 xtensa: gcc: add static PIE support gcc/ * config/xtensa/linux.h (LINK_SPEC): Add static-pie. Diff: --- gcc/config/xtensa/linux.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h index 540e4bf538f..bc7bee71517 100644 --- a/gcc/config/xtensa/linux.h +++ b/gcc/config/xtensa/linux.h @@ -54,9 +54,10 @@ along with GCC; see the file COPYING3. If not see #define LINK_SPEC \ "%{shared:-shared} \ %{!shared: \ - %{!static: \ + %{!static:%{!static-pie: \ %{rdynamic:-export-dynamic} \ - -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \ + -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \ + %{static-pie:-static -pie --no-dynamic-linker -z text} \ %{static:-static}} \ %{mabi=windowed:--abi-windowed} \ %{mabi=call0:--abi-call0}"