From: linted <linted90@gmail.com>
To: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] mips: Add appropriate linker flags when compiling with -static-pie
Date: Sun, 25 Sep 2022 11:49:46 -0400 [thread overview]
Message-ID: <CANP1oa03fQvDpOx6wx3kF4yQypO6GEJtMp8nCU_SjENS6fx0pA@mail.gmail.com> (raw)
In-Reply-To: <CANP1oa0QMfUCRwGpP46Hz3xz9CsHEkHdMJXJ5sv+92-boR3u5Q@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]
Hello,
I'm just checking to see if anyone has had a chance to look at this.
Thank you
On Wed, Sep 14, 2022 at 2:09 PM linted <linted90@gmail.com> wrote:
> Hello,
>
> This patch fixes missing flags when compiling with -static-pie on mips. I
> made these modifications based on the previously submitted static pie patch
> for arm as well as the working code for aarch64.
>
> I tested with a host of mips-elf and checked with mips-sim. This patch was
> also tested and used with uclibc-ng to generate static pie elfs.
>
> This is my first patch for gcc, so please let me know if there is anything
> I missed.
>
>
>
> Signed-off-by: linted <linted@users.noreply.github.com>
> ---
> gcc/config/mips/gnu-user.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
> index 6aad7192e69..b1c665b7f37 100644
> --- a/gcc/config/mips/gnu-user.h
> +++ b/gcc/config/mips/gnu-user.h
> @@ -56,11 +56,12 @@ along with GCC; see the file COPYING3. If not see
> #define GNU_USER_TARGET_LINK_SPEC "\
> %{G*} %{EB} %{EL} %{mips*} %{shared} \
> %{!shared: \
> - %{!static: \
> + %{!static:%{!static-pie: \
> %{rdynamic:-export-dynamic} \
> %{mabi=n32: -dynamic-linker " GNU_USER_DYNAMIC_LINKERN32 "} \
> %{mabi=64: -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "} \
> - %{mabi=32: -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}} \
> + %{mabi=32: -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}}} \
> + %{static-pie:-Bstatic -pie --no-dynamic-linker -z text} \
> %{static}} \
> %{mabi=n32:-m" GNU_USER_LINK_EMULATIONN32 "} \
> %{mabi=64:-m" GNU_USER_LINK_EMULATION64 "} \
> --
> 2.34.1
>
>
>
next prev parent reply other threads:[~2022-09-25 15:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-14 18:09 linted
2022-09-25 15:49 ` linted [this message]
2022-10-12 18:17 ` Jeff Law
2022-10-20 17:29 ` linted
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CANP1oa03fQvDpOx6wx3kF4yQypO6GEJtMp8nCU_SjENS6fx0pA@mail.gmail.com \
--to=linted90@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).