Changeset 3594


Ignore:
Timestamp:
Mar 6, 2013, 8:53:52 PM (17 months ago)
Author:
wmb
Message:

wrapper.c - added commentary telling another way to accomplish
the same result as mprotect()ing the dictionary memory to make
it executable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • forth/wrapper/wrapper.c

    r3577 r3594  
    22022202#endif 
    22032203#if defined(__linux__) && defined(ARM)  
     2204        /* There is another way to achieve the goal of making the */ 
     2205        /* dictionary executable.  You can add "-Wl,-z,execstack" */ 
     2206        /* to the cc command line or add "-z execstack" to the ld */ 
     2207        /* command line.  mprotect() is perhaps more precise, making */ 
     2208        /* only the dictionary executable while leaving the stack */ 
     2209        /* protected, although that is probably pointless since */ 
     2210        /* the whole point of this program is code injection. */ 
    22042211        mprotect(adr, len, PROT_READ | PROT_WRITE | PROT_EXEC); 
    22052212        __clear_cache(adr, adr+len); 
Note: See TracChangeset for help on using the changeset viewer.