Avoid generating unique ids via memory locations and linker scripts.
Instead, generate them using code produced by buildcommands.py.
Utilize gcc's ability to perform static string comparisons at compile
time to produce a unique id for each unique string.
This fixes a build failure on ARM introduced in 142b92b8. It also
reduces the complexity of the build.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
28 lines
804 B
ArmAsm
28 lines
804 B
ArmAsm
// Linker script that defines symbols around sections. The DECL_X()
|
|
// macros need this linker script to place _start and _end symbols
|
|
// around the list of declared items.
|
|
#include "autoconf.h" // CONFIG_MACH_AVR
|
|
#include "compiler.h" // __PASTE
|
|
|
|
#if CONFIG_MACH_AVR
|
|
#define DECL_SECTION .progmem.data.
|
|
#else
|
|
#define DECL_SECTION .rodata.
|
|
#endif
|
|
|
|
#define DECLWRAPPER(NAME) \
|
|
__PASTE(DECL_SECTION, NAME) : SUBALIGN(1) { \
|
|
NAME ## _start = . ; \
|
|
*( .rodata. ## NAME ##.pre* ) \
|
|
*( .rodata. ## NAME ##* ) \
|
|
*( .rodata. ## NAME ##.post* ) \
|
|
NAME ## _end = . ; \
|
|
}
|
|
|
|
SECTIONS
|
|
{
|
|
DECLWRAPPER(taskfuncs)
|
|
DECLWRAPPER(initfuncs)
|
|
DECLWRAPPER(shutdownfuncs)
|
|
}
|