Forum Discussion
Altera_Forum
Honored Contributor
21 years agoThanks, Scott, for the reminder about the linker script. It indeed rolled the .ctors and .dtors sections into .text but didn't provide a label by which to access them, so I've added that and put in a function to run through and call the constructor function pointers in sequence. We've done that on past projects where we provided the entire runtime support. I haven't found anywhere in the documentation that says we need to do that here, but there it is. So now I just need to figure out how to get rid of the 4 bytes of extraneous garbage libpthread.a has in a .ctors section (in pthread.o; pthread is a C library, isn't it??) which my function dutifully calls, sending it to Never Never Land.