[klibc] stack still executable on some arches?

Ben Hutchings ben at decadent.org.uk
Sat Apr 6 17:27:53 PDT 2024

On Fri, 2024-04-05 at 01:42 +0000, Thorsten Glaser wrote:
> On Debian/m68k, with latest klibc, I get this warning…
> /usr/bin/m68k-linux-gnu-ld: warning: /usr/lib/klibc/lib/crt0.o: requires executable stack (because the .note.GNU-stack section is executable)
> … trying to link an executable with klcc.

The 680x0 page table format doesn't have separate read and execute
permissions, so the stack is always executable.  And Linux/m68k relies
on that, always using a stack trampoline to return from signals.  (TIL:
Coldfire does have separate permissions in the TLB, so this could be
fixed there.)

I can add the no-executable-stack flag to crt0.o which should silence
the warning, but doesn't actually fix the issue.


Ben Hutchings
Theory and practice are closer in theory than in practice - John Levine

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.zytor.com/archives/klibc/attachments/20240407/388f7aee/attachment.sig>

More information about the klibc mailing list