summaryrefslogtreecommitdiff
path: root/src/hppa
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2007-10-01 08:35:01 -0600
committerDavid Mosberger-Tang <davidm@koala.mostang.com>2007-10-01 08:35:01 -0600
commit57e569646368cb730f028ecf1732143474e3e642 (patch)
treea76ac9bd99edf78a5194f6308f0bc0566e6fe39c /src/hppa
parentc340d04279f046b543066dbc8f36452602d7fd52 (diff)
downloadlibunwind-57e569646368cb730f028ecf1732143474e3e642.tar.gz
Mark Wielaard <mwielaard@redhat.com> writes:
On some systems executable stacks are denied. Since libunwind and the tests don't actually need executable stacks this patch marks all assembly files as not needing it. The original patch comes from frysk: 2007-04-05 Jan Kratochvil <jan.kratochvil@redhat.com> * src/hppa/getcontext.S, src/hppa/setcontext.S, src/hppa/siglongjmp.S, src/ia64/Ginstall_cursor.S, src/ia64/Linstall_cursor.S, src/ia64/dyn_info_list.S, src/ia64/getcontext.S, src/ia64/longjmp.S, src/ia64/setjmp.S, src/ia64/siglongjmp.S, src/ia64/sigsetjmp.S, src/ppc64/longjmp.S, src/ppc64/siglongjmp.S, src/x86/longjmp.S, src/x86/siglongjmp.S, src/x86_64/longjmp.S, src/x86_64/setcontext.S, src/x86_64/siglongjmp.S: Stack should be non-executable, for SELinux. I added a couple more markers for new files in current libunwind. Before this patch you would get the following on selinux enabled systems without allow_exec_stack: error while loading shared libraries: libunwind.so.7: cannot enable executable stack as shared object requires: Permission denied After the patch that error disappears and all test results are similar to the results on systems without executable stack protection.
Diffstat (limited to 'src/hppa')
-rw-r--r--src/hppa/getcontext.S4
-rw-r--r--src/hppa/setcontext.S4
-rw-r--r--src/hppa/siglongjmp.S4
3 files changed, 12 insertions, 0 deletions
diff --git a/src/hppa/getcontext.S b/src/hppa/getcontext.S
index ae485373..ec7554a0 100644
--- a/src/hppa/getcontext.S
+++ b/src/hppa/getcontext.S
@@ -68,3 +68,7 @@ _Uhppa_getcontext:
bv,n %r0(%rp)
.procend
+#ifdef __linux__
+ /* We do not need executable stack. */
+ .section .note.GNU-stack,"",@progbits
+#endif
diff --git a/src/hppa/setcontext.S b/src/hppa/setcontext.S
index 4eba4cd8..a36ea35c 100644
--- a/src/hppa/setcontext.S
+++ b/src/hppa/setcontext.S
@@ -71,3 +71,7 @@ _Uhppa_setcontext:
bv,n %r0(%rp)
.procend
+#ifdef __linux__
+ /* We do not need executable stack. */
+ .section .note.GNU-stack,"",@progbits
+#endif
diff --git a/src/hppa/siglongjmp.S b/src/hppa/siglongjmp.S
index 16cfcc68..34878dbe 100644
--- a/src/hppa/siglongjmp.S
+++ b/src/hppa/siglongjmp.S
@@ -10,3 +10,7 @@ _UI_longjmp_cont:
#warning fix me
bv %r0(%rp)
.procend
+#ifdef __linux__
+ /* We do not need executable stack. */
+ .section .note.GNU-stack,"",@progbits
+#endif