I am building my Ada/SPARK project using GNAT and I am using a linker script. Here is an excerpt:
SECTIONS
{
.code :
{
. = ALIGN(0x4);
*(.text.section1)
_end_of_section1 = .;
*(.text.section2)
...
}
}
The symbol _end_of_section1 is the address between the two sections. I'd like to be able to access this in my Ada code. I know it's possible in C using extern char _end_of_section1[];
. Is it possible to do something like this in Ada? If not, is there some other way to get this address in the code?