Page 1 of 1

Problem with the linker.

Posted: Mon Apr 11, 2011 9:57 am
by maakera
Hi, i could use you're help.

Is there something wrong with this script?

Code: Select all

OUTPUT_FORMAT("binary")
ENTRY(start)
INPUT(kernel.o ks.o)
SECTIONS
{
  .text  0x100000 : {
    code = .; _code = .; __code = .;
    *(.text)
    . = ALIGN(4096);
  }
  .data  : {
    data = .; _data = .; __data = .;
    *(.data)
    . = ALIGN(4096);
  }
  .bss  :
  {
    bss = .; _bss = .; __bss = .;
    *(.bss)
    . = ALIGN(4096);
  }
  end = .; _end = .; __end = .;
}
Command line:

Code: Select all

ld -T link.ld -o kernel.bin
Error line:

Code: Select all

ks.o: file not recognized: File format not recognized

Hope you can help ;)

Re: Problem with the linker.

Posted: Mon Apr 11, 2011 10:55 am
by Chandra
We can help, if you become more specific about the problem. What flags are you passing to the compiler? What formats are you linking? Are you using a Cross Compiler? You should have posted your complete build script.

Re: Problem with the linker.

Posted: Mon Apr 11, 2011 1:27 pm
by maakera
Basically, i solved the problem myself ^^