I tried to get work my 30 years ago done protected mode ”nanokernel”.
Bootsector reads it from USB to the address 0x9000, earlier from floppy.
My old linker script does not work any more. I do not know how to construct a new script. The code is unchanged.
My development environment is given in the comment area at the beginning of the script which i have provided next:
/*
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12)
Linux kernel: 4.15.0-142-generic #146~16.04.1-Ubuntu SMP
Ununtu 16.04/32 BIT system COMPILIED WITH FLAG -M32 TO BE SURE
MAKEFILE LD COMMAND: ld $(OBJS) -nostdlib -T $(LDS) -o wbs -M >map
ERROR MESSAGE:Makefile:21: recipe for target 'wbs' failed
Are * missing Some places meant to be everywhere before (.bss) (.text) (.data)
*/
MEMORY
{
ram(rwx) : ORIGIN = 0x9000,LENGHT = 0x10000
}
SECTIONS
{
.text_k:
{
init.o(.text)
k_*(.text)
} >ram:0x9000
.data_k:
{ init*(.data)
k_*(.data)
} >ram:0xd000
.bss_k: /*THIS IS LINE 21- ERROR? */
{
_bss_start = . ;
init*(.bss)
k_*(.bss)
} > ram:0xe000
_end = .;
_size_of_kernel = _end - _start;
process_start_base = .;
.p0:
{
p0*(.text)
p0*(.data)
p0*(.bss)
} >ram:0xf000
.p1 :
{
p1*(.text)
p1*(.data)
p1*(.bss)
} >ram:0xf400
.p2 :
{
p2*(.text)
p2*(.data)
p2*(.bss)
} >ram:0xf800
.p3 :
{
p3*(.text)
p3*(.data)
p3*(.bss)
} > ram:0xfc00
}