I'm using Qt 5.3.2 with GCC 4.8.2. I want to insert via the .pro file (using qmake) a section definition to the linker script created by qmake.
What I want to insert:
SECTIONS
{
.legacy_vars :
{
*myModule.o (.bss)
*myModule.o (.data)
}
.everything_else :
{
* (.bss)
* (.data)
* (.text)
}
}
SECTIONS
{
.legacy_vars :
{
*myModule.o (.bss)
*myModule.o (.data)
}
.everything_else :
{
* (.bss)
* (.data)
* (.text)
}
}
To copy to clipboard, switch view to plain text mode
Is this possible?
Thanks in advance!
To answer the question "why?":
I have legacy code in my project which I cannot change. But I need to reset its variables to reset its state. At the same time most of them are static and dont have functions to access them. Therefore I want to map the legacy codes variables to a defined section, read them when starting my program and if needed write them back in order to reset this part of the program.
Bookmarks