[klibc] [PATCH klibc 1/3] Revert " Kbuild: Tell gas we don't want executable stacks"

Ben Hutchings ben at decadent.org.uk
Wed Apr 29 15:01:59 PDT 2020


This reverts commit 9d8d648e604026b32cad00a84ed6c29cbd157641, which
broke signal handing on some architectures.

On m68k and parisc, signal return depends on a trampoline that the
kernel writes on the stack.  On alpha, s390, and sparc (32-bit), we
can avoid this by providing our own function as sa_restorer, but we
currently don't.

Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
 scripts/Kbuild.klibc | 2 +-
 usr/klibc/Kbuild     | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
index afc9a546..b7e99b56 100644
--- a/scripts/Kbuild.klibc
+++ b/scripts/Kbuild.klibc
@@ -125,7 +125,7 @@ KLIBCDEFS        += -D__KLIBC__=$(KLIBCMAJOR)          \
 KLIBCCPPFLAGS    += $(KLIBCDEFS)
 KLIBCCFLAGS      += $(KLIBCCPPFLAGS) $(KLIBCREQFLAGS) $(KLIBCARCHREQFLAGS)  \
                     $(KLIBCOPTFLAGS) $(KLIBCWARNFLAGS)
-KLIBCAFLAGS      += -D__ASSEMBLY__ -Wa,--noexecstack $(KLIBCCFLAGS)
+KLIBCAFLAGS      += -D__ASSEMBLY__ $(KLIBCCFLAGS)
 KLIBCSTRIPFLAGS  += --strip-all -R .comment -R .note
 
 KLIBCLIBGCC_DEF  := $(shell $(KLIBCCC) $(KLIBCCFLAGS) --print-libgcc)
diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
index 24bad07d..bec9cdb4 100644
--- a/usr/klibc/Kbuild
+++ b/usr/klibc/Kbuild
@@ -185,7 +185,6 @@ quiet_cmd_interp = BUILD   $@
       cmd_interp = $(KLIBCCC) $(klibccflags) -D__ASSEMBLY__     \
                              -DLIBDIR=\"$(SHLIBDIR)\"         \
 			     -DSOHASH=\"$(SOLIBHASH)\" \
-                             -Wa,--noexecstack \
 			     -c -o $@ $<
 
 $(INTERP_O): $(obj)/interp.S $(SOLIB).hash

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.zytor.com/archives/klibc/attachments/20200429/74c9f900/attachment.sig>


More information about the klibc mailing list