开发者

Unknown linking error [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly appl开发者_如何学运维icable, visit the help center. Closed 9 years ago.

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?


I'd have to guess a missing semicolon on the end of line 5.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜