On Tue, Jun 14, 2016 at 11:37 AM, Christophe Lyon christophe.lyon@linaro.org wrote:
On 14 June 2016 at 14:07, Jérôme Forissier jerome.forissier@linaro.org wrote:
Hi,
I've stumbled across an assembler error message that I don't understand.
bl1/aarch64/bl1_exceptions.S: Assembler messages: bl1/aarch64/bl1_exceptions.S:53: Error: non-constant expression in ".if" statement
I can reproduce with an FSF binutils. Not obvious why it is failing though.
The assembler error comes because you are subtracting two addresses in a .if, and one of more of those addresses is not a constant, because the assembler could not calculate a fixed address on the first pass through. However, it isn't obvious why the assembler is failing to calculate a fixed address, or why the aligns matter. If the aligns added a variable amount of in section padding, then that would prevent the addresses from being constant. But in this case, the aligns should not be adding a variable amount of padding. I'd have to spend time debugging the assembler to figure out what is wrong here.
Jim