Page 1 of 1

LD error

Posted: Sun Jun 13, 2004 11:00 pm
by pepito
Hello:

I want that my kernel to be loaded at the adress 0x50000, I am using this LD script to link it:

(a.o to p.o are the object files that compose my kernel)

STARTUP (a.o)
INPUT (b.o c.o d.o e.o f.o g.o h.o i.o j.o k.o l.o m.o n.o o.o p.o)
ENTRY (inicio)
OUTPUT (kernel.bin)
OUTPUT_FORMAT (binary)
FORCE_COMMON_ALLOCATION
SECTIONS { . = 0x50000;
   .text : { *(.text) }
          .data : { *(.data) }
        .bss :  { *(.bss) *(COMMON) }}

But I get these errors:

a.o(.text+0x7):a.o: relocation truncated to fit: 16 .text
a.o(.text+0x93):a.o: relocation truncated to fit: 16 .text
a.o(.text+0x2ba):a.o: relocation truncated to fit: 16 .text
a.o(.text+0x2c0):a.o: relocation truncated to fit: 16 .text
a.o(.text+0x5d1):a.o: relocation truncated to fit: 16 .text
a.o(.text+0x5d7):a.o: relocation truncated to fit: 16 .text
a.o(.text+0x5de):a.o: relocation truncated to fit: 16 .text
a.o(.text+0x5e5):a.o: relocation truncated to fit: 16 .text
a.o(.text+0x5ed):a.o: relocation truncated to fit: 16 .text
a.o(.text+0x5f4):a.o: relocation truncated to fit: 16 .text
a.o(.text+0x5fd):a.o: relocation truncated to fit: 16 .text
a.o(.text+0x602):a.o: relocation truncated to fit: 16 .text
a.o(.text+0x60d):a.o: relocation truncated to fit: 16 .text
j.o(.text+0x39a):j.o: relocation truncated to fit: 16 .text
j.o(.text+0x3a5):j.o: relocation truncated to fit: 16 .text
k.o(.text+0x5e4):k.o: relocation truncated to fit: 16 .text
l.o(.text+0x9d):l.o: relocation truncated to fit: 16 .text
l.o(.text+0xaa):l.o: relocation truncated to fit: 16 .text
l.o(.text+0xb5):l.o: relocation truncated to fit: 16 .text
l.o(.text+0xc8):l.o: relocation truncated to fit: 16 .text
l.o(.text+0xd9):l.o: relocation truncated to fit: 16 .text
l.o(.text+0xec):l.o: relocation truncated to fit: 16 .text
l.o(.text+0x118):l.o: relocation truncated to fit: 16 .text
l.o(.text+0x13a):l.o: relocation truncated to fit: 16 .text
l.o(.text+0x15e):l.o: relocation truncated to fit: 16 .text
l.o(.text+0x16b):l.o: relocation truncated to fit: 16 .text
l.o(.text+0x176):l.o: relocation truncated to fit: 16 .text

The problem arise when I add the address 0x50000 to SECTIONS.

Any idea?

Thank you

pepito