I have written a library implementing HEAP functionality 200 bytes long.
The library consists of two functions and one initialization routine: malloc, free, and init.
I have defined init like
.section .init3, "ax", @progbits
INIT CODE HERE
How can I make it be linked to the app using this library whenever malloc, or free is used? or make it link every time?
Right now if I include the .S file containing the initialization routine, the init code gets into the right place (before main), but if I include the library, it just ignores it. (Doesn't get copied to the .text section. What Can I do?