On Mon, 17 Nov 2003 08:03:59 -0500, Jakub Jelinek wrote: > On Mon, Nov 17, 2003 at 01:54:55PM +0100, Gerard Milmeister wrote: > > Some software, among them clisp, scm and mit-scheme don't work anymore > > with FC1. One problem seems to be that on FC1 stack and malloced memory > > is no longer executable, at least not without using mprotect. > > Interpreters and compilers like the above commonly allocate a piece of > > memory and fill it with executable code. I am sure they can be adapted > > to work on FC1, but I would have preferred that the FC1 kernel would > > behave in the same way as the RH9 one. Is there any way to disable this > > behaviour. Trying to get the problem fixed by the upstream developers > > will probably take a long time, and it seems that other Linux distros > > don't show this problem... > > If they need executable stack in a way which is not known to the compiler, > the programmer has to tell it to the toolchain. > If a program say takes address of a nested function, GCC knows it needs > executable stack and arranges things automatically. > Otherwise, either an object file can be marked as needing executable > stack (with -Wa,--execstack; at least one such object will make the whole > shared library or binary requiring executable stack), or during link > time with -Wl,-z,execstack or after it using execstack(8) utility. Unfortunately: # execstack -c $(which scheme) execstack: /usr/bin/scheme: Reshuffling of objects to make room for program header entry only supported for shared libraries > The defaults are such that programs and/or libraries compiled/linked > on <= RHL9 are always assumed to potentially require executable stack, > but if you build a new program on FC1, you really need to tell the toolchain > about it. The problem is, these are binaries built on RHL9, but run on FC1. I haven't had the time to look at debug output yet, an strace fragment can be found here: https://bugzilla.fedora.us/show_bug.cgi?id=823 --
Attachment:
pgp00128.pgp
Description: PGP signature