PE kernel

git-svn-id: svn://kolibrios.org@849 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2008-08-09 08:38:20 +00:00
parent 7cb2a21b33
commit c6d4df748c
4 changed files with 53 additions and 11 deletions

View File

@ -269,7 +269,11 @@ code_16:
endofcode:
gdte:
__edata: ;equ $-OS_BASE
edata: ;equ $-OS_BASE
section '.bss' code readable align 4096
org edata
align 4096

View File

@ -11,7 +11,4 @@ $Revision$
include 'dev_fd.inc'
include 'dev_hdcd.inc'
include 'getcache.inc'
; jmp __12345
include 'sear_par.inc'
;__12345:

View File

@ -1,3 +1,6 @@
format MS COFF
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved.
@ -104,9 +107,16 @@ pci_data_sel equ (pci_data_32-gdts)
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
section '.flat' code readable align 16
public __start
extrn __edata
use32
org 0x100000
org 0x001001E0
align 4
mboot:
dd 0x1BADB002
@ -114,7 +124,7 @@ mboot:
dd -(0x1BADB002 + 0x00010003)
dd mboot
dd 0x100000
dd __edata - OS_BASE
dd __edata; ;__edata - OS_BASE
dd LAST_PAGE
dd __start
@ -5476,10 +5486,7 @@ include "data32.inc"
__REV__ = __REV
uglobals_size = $ - endofcode
diff16 "end of kernel code",0,$
;uglobals_size = $ - endofcode
;diff16 "end of kernel code",0,$
align 16
__end:

View File

@ -0,0 +1,34 @@
ENTRY(__start)
OUTPUT_FORMAT(pei-i386)
SECTIONS
{
. = SIZEOF_HEADERS;
. = ALIGN(32);
.flat . + __image_base__ :
{
*(.flat)
}
__edata = .;
.bss ALIGN(4096) :
{
*(.bss) *(COMMON)
}
/DISCARD/ :
{
*(.debug$S)
*(.debug$T)
*(.debug$F)
*(.drectve)
*(.reloc)
*(.edata)
}
}