From 7b4988d43fba0e8c2898eed08ce489d1adab6a19 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 15 May 2017 07:36:56 +0000 Subject: [PATCH] lb1spc.S: Emit .note.GNU-stack section for a non-executable stack. * config/sparc/lb1spc.S [__ELF__ && __linux__]: Emit .note.GNU-stack section for a non-executable stack. From-SVN: r248046 --- libgcc/ChangeLog | 5 +++++ libgcc/config/sparc/lb1spc.S | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index f1b3ffcd5a14..f161d8fb2f21 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2017-05-15 Adhemerval Zanella + + * config/sparc/lb1spc.S [__ELF__ && __linux__]: Emit .note.GNU-stack + section for a non-executable stack. + 2017-05-09 Andreas Tobler Backport from mainline diff --git a/libgcc/config/sparc/lb1spc.S b/libgcc/config/sparc/lb1spc.S index b60bd5740e76..e69386464048 100644 --- a/libgcc/config/sparc/lb1spc.S +++ b/libgcc/config/sparc/lb1spc.S @@ -5,6 +5,12 @@ slightly edited to match the desired calling convention, and also to optimize them for our purposes. */ +/* An executable stack is *not* required for these functions. */ +#if defined(__ELF__) && defined(__linux__) +.section .note.GNU-stack,"",%progbits +.previous +#endif + #ifdef L_mulsi3 .text .align 4 -- 2.47.2