bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/4643] linker scripts do not accept symbols in MEMORY section


From: row at telocate dot com
Subject: [Bug ld/4643] linker scripts do not accept symbols in MEMORY section
Date: 14 Apr 2010 22:56:40 -0000

------- Additional Comments From row at telocate dot com  2010-04-14 22:56 
-------
The point is, I should be able to define a constant-valued symbol, e.g. "mySym =
0x100;" *outside* (and before) the MEMORY command, then use the symbol (i.e. a
meaningful name instead of a bare literal) inside the MEMORY command, *and* in
logically related expressions in the rest of the script. As Alan Modra already
pointed out, this bug is just the result of an oversight in the existing
implementations, wherein the (informal) specification was not completely
implemented. The application fails to do what its documentation says it should,
and what common sense suggests and good programming practice requires; and this
specific shortcoming raises a significant barrier to writing more-maintainable
linker scripts.

Dave Korn, a long time ago, provided a detailed description of this issue and
sketched a solution: http://www.cygwin.com/ml/binutils/2004-03/msg00540.html. My
YACC skills are very rusty, or else I might try and fix this myself.

I'm developing embedded systems where this (unimplemented) feature would be
quite handy. I need to use the MEMORY command to build an accurate model of the
target memory layout, that will drive the rest of linking process, not to
mention defining symbols that will drive bootloading, memory initialization,
etc. Yes I might be able to use some sort of kludged work-around; but why not
just fix the bug? I'm dismayed that something as obvious and potentially useful
as this feature has gone un-addressed for so long...

Row Reith, address@hidden
[rr]


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


http://sourceware.org/bugzilla/show_bug.cgi?id=4643

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]