From: Stafford Horne <shorne@gmail.com>
To: GCC patches <gcc-patches@gcc.gnu.org>
Cc: Linux OpenRISC <linux-openrisc@vger.kernel.org>,
Stafford Horne <shorne@gmail.com>
Subject: [PATCH] or1k: add .note.GNU-stack section on linux
Date: Mon, 6 Jan 2025 13:01:17 +0000 [thread overview]
Message-ID: <20250106130117.1230925-1-shorne@gmail.com> (raw)
In the OpenRISC build we get the following warning:
ld: warning: __modsi3_s.o: missing .note.GNU-stack section implies executable stack
ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
Fix this by adding a .note.GNU-stack to indicate the stack does not need to be
executable for the lib1funcs.
Note, this is also needed for the upcoming glibc 2.41.
libgcc/
* config/or1k/lib1funcs.S: Add .note.GNU-stack section on linux.
---
libgcc/config/or1k/lib1funcs.S | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libgcc/config/or1k/lib1funcs.S b/libgcc/config/or1k/lib1funcs.S
index 0c2ec5fc8c4..8f7266bedb9 100644
--- a/libgcc/config/or1k/lib1funcs.S
+++ b/libgcc/config/or1k/lib1funcs.S
@@ -19,6 +19,11 @@ a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+/* An executable stack is *not* required for these functions. */
+#ifdef __linux__
+.section .note.GNU-stack,"",%progbits
+.previous
+#endif
#ifdef L__mulsi3
.balign 4
--
2.47.0
next reply other threads:[~2025-01-06 13:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-06 13:01 Stafford Horne [this message]
2025-01-06 14:37 ` [PATCH] or1k: add .note.GNU-stack section on linux Jeff Law
2025-01-06 17:02 ` Stafford Horne
2025-01-06 17:03 ` Jeff Law
2025-01-06 17:26 ` Stafford Horne
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=20250106130117.1230925-1-shorne@gmail.com \
--to=shorne@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=linux-openrisc@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.