ソースを参照

Use _text, rather than assuming _text==0.

tags/v0.9.3
Michael Brown 17年前
コミット
ece4ff929e
1個のファイルの変更4行の追加1行の削除
  1. 4
    1
      src/arch/i386/core/emalloc.c

+ 4
- 1
src/arch/i386/core/emalloc.c ファイルの表示

@@ -33,8 +33,11 @@
33 33
 /** Equivalent of NOWHERE for user pointers */
34 34
 #define UNOWHERE ( ~UNULL )
35 35
 
36
+/** Start of Etherboot text, as defined by the linker */
37
+extern char _text[];
38
+
36 39
 /** Top of allocatable memory */
37
-#define TOP ( virt_to_user ( NULL ) )
40
+#define TOP ( virt_to_user ( _text ) )
38 41
 
39 42
 /** An external memory block */
40 43
 struct external_memory {

読み込み中…
キャンセル
保存