Accessing GNU Linker Script Symbols from C/C++

With the GNU compiler and linker I can place variables into custom sections (see “Defining Variables at Absolute Addresses with gcc“). This article is about how to get the section start and end address so I can for example access that range in my code. Or in general ways: how to use symbols defined in the linker script accessible in the C source code.

Using Linker Script Symbols in Source Code

Using Linker Script Symbols in Source Code

Continue reading