This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[arm-elf-as] order of subsections/location of literal pool
- From: Sven Köhler <sven dot koehler at gmail dot com>
- To: binutils at sources dot redhat dot com
- Date: Sat, 23 May 2009 21:28:50 +0200
- Subject: [arm-elf-as] order of subsections/location of literal pool
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.
Are any guarantees of any kind?
Regards,
Sven