8 Bytes of read write and excute

Hi
I'm trying to create some code that needs rwx, but only about 8 bytes. Is there any way to do this and how
Thanks

Parents
  • We don't even know what processor you have - if there are any memory protection involved.

    But you can normally place code in RAM. Both automatically using the linker configuration, or manually by writing instructions to an array and then cast the address of this array as a function pointer - the important thing with casting is to consider ARM or thumb instructions, based on alignment.

Reply
  • We don't even know what processor you have - if there are any memory protection involved.

    But you can normally place code in RAM. Both automatically using the linker configuration, or manually by writing instructions to an array and then cast the address of this array as a function pointer - the important thing with casting is to consider ARM or thumb instructions, based on alignment.

Children
More questions in this forum