I?m porting my OS over to C++ (from assembly), and wanted to know if there is anyway to get the address and size of the ?.text?, ?.data?, and ?.data1? sections inserted into a variable at compile time. It?s a cinch to do in MASM but I?m having difficulty in C++, any suggestions.
linux uses the following code to address the various sections:
extern char _text, _etext, _edata, __bss_start, _end;
A last resort would have my PE loader store the section header along with the ?image base? variable and pass it during load of the executable to memory.
I?m using the Intel C++ 7.0 Compiler for Windows (updated as of today)
Thanks for any help,