Where does the first 0x1000 bytes comes from
Posted: Mon Jan 02, 2006 10:46 pm
To explain what's the problem,I have to paste some code:
but in UltraEdit/HexEdit I got the following bin code at the offset of 0x0000:1000,instead of 0x0000:0000 :
here is my command and link script.
Can anyone tell me why?
If I want to remove the first 0x1000 bytes ,what should I do?Or I should not remove it?
Thanks!
Code: Select all
[section .text]
[bits 16]
entry:
cli
mov word [0B0000h],9F44h
mov word [0B0002h],9F46h
//////////////////////////////
the following is from the dumpobj
//////////////////////////////
10000: fa cli
10001: c7 06 00 00 44 9f movl $0x9f440000,(%esi)
10007: c7 06 02 00 46 9f movl $0x9f460002,(%esi)
.......
Code: Select all
FAC7 0600 0044 9FC7 0602 0046 9FC7 0604
0040 9FC7 0606 0044 9FE8 0C00 E910 00B4
Code: Select all
nasm kentry.asm -f coff -o kentry.o
ld -T ldscript kentry.o -o Kentry.bin
objdump --source Kentry.bin >krnl.lst
Code: Select all
ENTRY(entry)
SECTIONS{
.text 0x10000 : {
*(.text)
}
textEnd = . ;
.data : {
*(.data)
*(.rodata)
}
dataEnd = .;
.bss : {
*(.common)
*(.bss)
}
bssEnd = .;
}
If I want to remove the first 0x1000 bytes ,what should I do?Or I should not remove it?
Thanks!