Usually (and this is what we do in the powerpc part of the Linux kernel), we get a C preprocessor to preprocess ASM files for us:
#ifdef UNIT_TEST
b test
#else
b work
#endif
Typically these files are marked with .S
instead of .S
or .asm
to indicate that they are preprocessed.
source
to share