I am really shocked that GCC does not support many #pragma like other compilers. I have a huge C90 code base with millions of lines of code, the biggest issue is converting #pragma arm section to something compatible with GCC. I know that I can use __attribute(section) or create a short macro for each section but I still have to copy and past this for millions of lines. I also know that I can use linker script but this requires reorganization of millions of files, I have thousands of files where my code looks like this:
...thousands lines of code#if flag #pragma arm section blah = "blah"#endif...thousands lines of code#if flag #pragma arm section#endif...thousands lines of code
I do not even know how to use a linker script to specify the section of these lines of code or if such a flag is enabled... and it is nearly impossible to reorganize all of these files to separate millions of functions and variables into separate obj files.
Anyone know of any solution even if it requires building the GCC compiler from scratch? any plugins out there that modify the compiler to accept such pragmas? To me it just seems easy to have the compiler to retain a local stack for which sections to use while compiling. Help please!