Execute a piece of code from the data-section
问题 I want to take a piece of code, copy it into a global array and execute it from there. In other words, I am trying to to copy a bunch of instructions from the code-section into the data-section, and then set the program-counter to continue the execution of the program from the data-section. Here is my code: #include <stdio.h> #include <string.h> typedef void(*func)(); static void code_section_func() { printf("hello"); } #define CODE_SIZE 73 // I verified this size in the disassembly of 'code