Dave Martin dave.martin@linaro.org writes:
Another way of doing a similar thing is to mark __mylib_constructor as undefined in all the objects that make up the library.
Unfortunately, there seems to be no obvious way of doing that: the assembler generates undefined symbol references automatically for unresolved references at assembly time. There's no way for force the existence of an undefined symbol without an actual reference to it.
One way of doing this is to create an R_ARM_NONE relocation against it, such as:
.reloc .,R_ARM_NONE,__mylib_constructor
This isn't as hacky as it might sound, because undefined references don't really make much sense without an associated reloc.
Richard