I'm linking a program with 2 assembly files.
How can I force the program to put some code of the first file before some code of the second file (in this pseudocode snippet, I want the instructions to be called from 0 to 5)?
#file a
do_this:
inst 1
inst 2
do_that:
inst 3
inst 4
#file b
no_no_do_this_first:
inst 0
and_do_this_finally:
inst 5
using sections?
Is there another way?
Ok, after reading some more I found that as I'm compiling with C, this answer might apply: https://stackoverflow.com/a/54584294/10734452
But currently my files are:
crt0_generic
,
crt0_customerA
or
crt0_generic
,
crt0_customerB
and I need some function of the crt0_generic to be called first