In assembly language I use .section directive to tell the assembler what section to output to e.g
.section init
Is there a way to do the same in C files. I want the code for some files to go into different section so I can load it to different memory address. I know I can create a script for ld and specify sections there but I dont want to do that. Is there some compiler switch or .section directive kind of thing for C files that will do this?