0

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?

Nathan Campos
  • 28,769
  • 59
  • 194
  • 300

1 Answers1

1

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

bmargulies
  • 97,814
  • 39
  • 186
  • 310