This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
division in ld scripts
- From: "Jan Beulich" <JBeulich at novell dot com>
- To: <binutils at sourceware dot org>
- Date: Wed, 09 Sep 2009 14:38:26 +0100
- Subject: division in ld scripts
Is it known/intended/documented that using the division operator (/) in
ld scripts requires a blank to follow, at least in some cases (see below)?
All other operators seem to behave as expected (apart from the missing
but unlikely to be needed ^), while / results in a "syntax error" failure.
Thanks, Jan
OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
OUTPUT_ARCH(i386:x86-64)
ENTRY(test)
PHDRS
{
text PT_LOAD ;
}
SECTIONS
{
. = 0x00401000+2;
. = 0x00401000-2;
. = 0x00401000*2;
. = 0x00401000/2;
. = 0x00401000%2;
. = 0x00401000&2;
. = 0x00401000|2;
/* . = 0x00401000^2;*/
.text : {
_stext = .;
*(.text)
*(.gnu.warning)
_etext = .;
} :text = 0x9090
.rodata : {
*(.rodata)
*(.rodata.*)
} :text
.data : {
*(.data)
} :text
.bss : {
*(.bss)
} :text
_end = . ;
}