Hi, all For security research purposes, i want to apply the register allocation randomization technique on spidermonkey, i.e. making spidermonkey's baseline-compiler and ion-compiler to randomly select registers when generating native code. I implement this idea by hooking the Register::encoding() (located at the file jit/Registers.h:54) method. Because I need to use some new global data, so I define and put them in a new CPP file named Registers.cpp. Now, my problem is that I failed to compile the changes with commands like "make -C build_DBG.OBJ" because the Registers.cpp file could not be compiled.
To solve this problem, I had run the "../configure --enable-debug" and even created a clean directory for building. However, both failed. Then, I tried to find a solution by digging into the Shell scripts and python scripts, and got the knowledge that spidermonkey merges CPP files into Unified_CPP files and then processes the compilation. However, i still didn't know how to configure or feed these scripts. Now, my solution is manually add the path of Registers.cpp into the file "Unified_cpp_js_src20.cpp". In this way, i can successfully compile the changes. My questions is whether there is an elegant solution, could someone can tell me? Thanks. _______________________________________________ dev-tech-js-engine-internals mailing list dev-tech-js-engine-internals@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals