Home arrow Forums
OSDEV Forums  


virendra_mishra
User

Fresh Osdever
Posts: 1
graphgraph
Karma: 0  
The linker script - 2008/04/14 06:25 thanx for ur attention flux.........

actually i hav solved that problem but i think i must share it with u

Earlier the linker script was like this......


OUTPUT_FORMAT("binary")
ENTRY(start)
phys = 0x00100000;
SECTIONS
{
.text phys : AT(phys) {
code = .;
*(.text)

. = ALIGN(4096);
}
.data : AT(phys + (data - code))
{
data = .;
*(.data)
. = ALIGN(4096);
}
.bss : AT(phys + (bss - code))
{
bss = .;
*(.bss) *(COMMON)
. = ALIGN(4096);
}

end = .;
}



The problem was, all string which i declared like puts("this is a string "); this was going on the very first bit of final .bin file which lets the multiboot header to go down and so grub was not able to recognize the .bin file as a kernel file

What i did I added *(.rodata.*) in .data section below *(.data) and the problem was resolved...

i got this idea after looking assembly conversion of my .c files...
  | | The administrator has disabled public write access.
OSDEV
Community
Advertisement
   

A WebArticles site. Sponsored by Evoleto. Motorola V525 / Business Directory / Delaware Incorporation / Home Made Bazaar