Hi,
at the moment, I'm writing a small assembler-only program.
There are a few constraints, and I would make to sure, that they are
met.
The program looks something like this:
(target is arm-elf)
.text 2
param .long 0x44332211
.text 1
ldr r1, =0x12345678
ldr r2, param
I use subsection for two reasons:
- it seems that the literal pool (in this case, the literal 0x12345678
will be stored there) is always placed at the end of the current
subsection (it must not be placed after param)
- it seems that the subsection 2 is always places after subsection 1
Are there two conditions always met?
The .long param should always be the last 4 bytes of the program. The
last 4 bytes of the program are to be modified during the process of
uploading the code to some embedded system. So it's very important
that
they are always the last 4 bytes.