aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorStafford Horne <shorne@gmail.com>2025-01-06 12:12:40 +0000
committerStafford Horne <shorne@gmail.com>2025-01-06 17:20:43 +0000
commit803808b4ad224ba6862538b63e59b15778c60975 (patch)
tree2c93e26e2fb82ccac62eeeeeaa4163f9322baaad /libgcc
parentfa778ba7d04497bdf32751488c8efd82db3b5e65 (diff)
downloadgcc-803808b4ad224ba6862538b63e59b15778c60975.zip
gcc-803808b4ad224ba6862538b63e59b15778c60975.tar.gz
gcc-803808b4ad224ba6862538b63e59b15778c60975.tar.bz2
or1k: add .note.GNU-stack section on linux
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.
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/config/or1k/lib1funcs.S5
1 files changed, 5 insertions, 0 deletions
diff --git a/libgcc/config/or1k/lib1funcs.S b/libgcc/config/or1k/lib1funcs.S
index 59e1312..6f4f145 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