gcc-m68k cross compiler problem gcc2.95.2

Mahadev K Cholachagudda kcmahadev@zilogindia.com
Sun Apr 1 00:00:00 GMT 2001


Thanks 
a lot pierre.
mahadev
 

  -----Original Message----- From: 
  crossgcc-owner@sources.redhat.com 
  [mailto:crossgcc-owner@sources.redhat.com] On Behalf Of Pierre 
  Saucourt-Harmel (r54698) Sent: Friday, January 12, 2001 1:44 
  PM To: Mahadev K Cholachagudda Cc: 
  crossgcc@sources.redhat.com Subject: Re: gcc-m68k cross compiler 
  problem gcc2.95.2 Hello, 
  Mahadev K Cholachagudda wrote: ... 
  I think if i execute gcc to get me the final 
    executable file, the gcc will intern call pre-processor, c-compiler, 
    assembler and then linker. I think the linker may not be getting correct 
    linker script or the above definitions such as (hardware_init_hook etc) 
    are not there in the linker script which ld is looking for. 
    Am i correct ? Yes, you are. 
  Just look at the ld.info documentation (part of binutils package) to study 
  how the linker takes your script and which commands you can use to write this 
  script. Your command line to compile should look like that (if your linker 
  script is named "hello.ld"): m68k-coff-gcc -Wl,--script=hello.ld 
  hello.c 
  Moreover, as your gcc compiler do not link with a default C standard 
  library, I think you did not generate and install correctly the newlib 
  package. That's why reference to atexit, printf, _exit and _cleanup 
  symbols are unresolved. 
  Your gcc compiler should automatically (without adding any option to the 
  m68k-coff-gcc invocation) link your executable file with the libc.a or libg.a. 
  Check the presence of these libraries under: 
  <your-installation-directory>/m68k-coff/lib 
  For __FINI_SECTION__ and __INIT_SECTION__ sections, you should have defined 
  them into your linker script. For software_init_hook and harware_init_hook 
  symbols, I don't know. 
  Regards, Pierre.     



More information about the crossgcc mailing list