This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Variables in linker script
- From: Nikola Ikonic <nikola dot ikonic at gmail dot com>
- To: binutils at sourceware dot org
- Date: Tue, 21 Sep 2010 13:43:17 +0200
- Subject: Variables in linker script
Hello all,
I have an issue with variables in linker script and I was wondering
would someone be kind enough to answer me on some questions.
Linker would not "swallow" following piece of code in linker script:
"OR = 0x40132d00;
MEMORY
{
/*These commands describe block locations (execution area)*/
MODULE2 : ORIGIN = OR, LENGTH = 0x6d7b00
}"
It gives error: "nonconstant expression for.."
>From what I understand, currently, linker does not support this
feature (usage of variables in memory region definition).
I would like to implement this in linker.
I've looked little bit at linker code already (saw the ldexp.c file
and exp_get_vma() where this error message comes from).
First, I would like to ask if there is a table of variables in linker?
I am asking this because linker does process simple statements with
variables such as:
"OR = 0x40132d00;"
I was wondering if someone could answer me, which part of code process
this statement? Where is value of OR variable held (in this example)?
Could this kind of table be used for solving my problem?
Thank you in advance.
Regards,
Nikola