I need to use Visual C ++ to create a customized Apache web server. Here is the goal I am trying to achieve: specify some functions or data in the Apache source code and put them in separate and 4k pages aligned sections (not .text.data.bss) of the output .exe file.
The cabinet solution I can find on the Internet is to use the use / Gy compiler options to compile each function into different COMDATs, and then use the / ORDER linker options to place the COMDAT in the given order. However, this is simply reordering within a section without changing the layout of the section in the output .exe file or creating a new section. On Linux, I can use the compiler "section" attribute and script linker to accomplish my goal. Is there an equivalent solution in Visual C ++? Thank you very much: -)
source share