If the output from the compiler is a binary object (.o) instead of the assembly (.s), I'd use gcc's inline assembly extension to call the GNU assembly ".incbin" directive (plus the necessary directives to put it in the correct section with an exported symbol).