When working directly with ARM assembly I can use .thumb
and .thumb_func
and their analogous arm directives to instruct the assembler which flavor of instructions to output.
Is there a matching compiler directive when developing C code? The GCC documentation I've seen mentions various command line options to allow thumb and arm code to work in the same binary but the output looks like it's an entire binary that's in either thumb or ARM. I want to be able to specify how individual functions are compiled.
If not, is there another way to accomplish this? I was thinking I could compile multiple times and then manually splice the disassemble to manually splice the functions together in a new binary but I'm hoping there's an easier way.