Unknow Linking Error

Posted by Nathan Campos on Stack Overflow See other posts from Stack Overflow or by Nathan Campos
Published on 2010-03-21T19:36:17Z Indexed on 2010/03/21 19:41 UTC
Read the original article Hit count: 294

Filed under:
|
|
|
|

I'm developing my own OS, but for this I need to touch on linking, then I've done this linking script to build it:

ENTRY (loader)

SECTIONS{
   . = 0x00100000
   .text : {
      *(.text)
   }

   .bss : {
      sbss = .;
      *(COMMON)
      *(.bss)
      ebss = .;
   }
}

.data ALIGN (0x1000) : {
   start_ctors = .;
   *(.ctor*)
   end_ctors = .;
   start_dtors = .;
   *(.dtor*)
   end_dtors = .;
   *(.data)
}

But when I try to link the things, I got some errors

$ ld -T linker.ld -o kernel.bin loader.o kernel.o
ld:linker.ld:5: syntax error
$

What can I do?

© Stack Overflow or respective owner

Related posts about ld

Related posts about linker