Browse Source

Use _text, rather than assuming _text==0.

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
ece4ff929e
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      src/arch/i386/core/emalloc.c

+ 4
- 1
src/arch/i386/core/emalloc.c View File

@@ -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 {

Loading…
Cancel
Save