This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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 = . ;
}



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]