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]

ld ia32, nonconstant expression for load base when using "ADDR(.bss) + SIZEOF(.bss)"


 Hello,

 With:
etienne@cygne:~/linux/linux-2.6.21-gujin$ ld --version
GNU ld (GNU Binutils for Debian) 2.17.50.20070426
Copyright 2007 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.

 I can no more define, in the Linux linker file, the section:
  .realmode 0 : AT (ADDR(.bss) + SIZEOF(.bss) - 0xC0000000) {
      ....
      }

 The exact error message I get is:
etienne@cygne:~/linux/linux-2.6.21-gujin$ make linux-2.6.21.kgz
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CHK     include/linux/compile.h
  GEN     .version
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
arch/i386/kernel/vmlinux.lds:168: nonconstant expression for load base
make: *** [.tmp_vmlinux1] Error 1
etienne@cygne:~/linux/linux-2.6.21-gujin$ head -177 arch/i386/kernel/vmlinux.lds | tail
-10
  .realmode 0 : AT (ADDR(.bss) + SIZEOF(.bss) - 0xC0000000) {
 *(.init.text16)
 . = ALIGN(16);
 _sdata16 = .;
 *(.rodata16* .data16 .bss16)
 . = ALIGN(16);
 _edata16 = .; /* maximum 0x1000 i.e. 4 Kb limit */
 *(.text16)
 . = ALIGN(16);
 _end16 = .;

 Is there something obvious which has changed in my case of creating a section
 to be linked at zero (linker not aware of ia32 segments) and added at the end of
 the file, after BSS?
 Replacing "ADDR(.bss) + SIZEOF(.bss)" by a constant get me a link, but...

 Thanks,
 Etienne.





      
	
		
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com


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