This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
trouble with INCLUDE in linker command files
- To: binutils at sourceware dot cygnus dot com
- Subject: trouble with INCLUDE in linker command files
- From: Guy dot McCarthy at microchip dot com
- Date: Tue, 16 Oct 2001 15:12:37 -0700
Hello,
There appears to be a bug in ld having to do with INCLUDE in linker
command files. I am using binutils v2.11.2 with a target of
i386-pc-cygwin.
If a file called "provides.lkr" includes the single line:
PROVIDE(WREG0 = 0x00);
And ld is invoked like this:
ld --script=sample.lkr
The following error message is printed:
ld:sample.lkr:15: syntax error
If the INCLUDE command is removed, the linker script parses just fine.
Curiously, the MAX expression seems to trigger the problem.
This test case was boiled down from a much larger file that really needs
INCLUDE.
Any suggestions?
Thanks in advance,
Guy McCarthy
guy.mccarthy@microchip.com
MEMORY
{
program (rx) : ORIGIN = 0, LENGTH = 0x8000
data (!rx) : ORIGIN = 0, LENGTH = 0x8000
}
INCLUDE provides.lkr
SECTIONS
{
.text ALIGN(4) :
{
*(.text);
} >program
.bss ALIGN(2) :
{
*(.bss);
} >data
.ybss MAX( 0x3000 , ALIGN(2)) :
{
*(.ybss);
} >data
}