summaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorRobert de Bath <rdebath@poboxes.com>2002-02-17 23:02:29 +0100
committerLubomir Rintel <lkundrak@v3.sk>2013-10-23 23:48:46 +0200
commitdf538463687d768b6ee8247ff4412b78850e7404 (patch)
tree52f42c02ef8139e5d73a8504e1bb3e896f3c0bc9 /ld
parentd91fa39567f5659e3931cf61517d62fddcd87570 (diff)
downloaddev86-df538463687d768b6ee8247ff4412b78850e7404.tar.gz
Import Dev86src-0.16.2.tar.gzv0.16.2
Diffstat (limited to 'ld')
-rw-r--r--ld/include/fcntl.h2
-rw-r--r--ld/typeconv.c4
-rw-r--r--ld/writex86.c9
3 files changed, 8 insertions, 7 deletions
diff --git a/ld/include/fcntl.h b/ld/include/fcntl.h
deleted file mode 100644
index 8c1ec8b..0000000
--- a/ld/include/fcntl.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define O_RDONLY 0
-#define O_WRONLY 1
diff --git a/ld/typeconv.c b/ld/typeconv.c
index 708d92b..d8c0c89 100644
--- a/ld/typeconv.c
+++ b/ld/typeconv.c
@@ -15,8 +15,8 @@ void xxerr(x) char * x; { write(2, x, strlen(x)); }
static int no_swap = 1;
-static long_off[4] = {0,1,2,3};
-static int_off[2] = {0,1};
+static int long_off[4] = {0,1,2,3};
+static int int_off[2] = {0,1};
PUBLIC bool_pt typeconv_init(big_endian, long_big_endian)
bool_pt big_endian;
diff --git a/ld/writex86.c b/ld/writex86.c
index 86c3157..70ecdde 100644
--- a/ld/writex86.c
+++ b/ld/writex86.c
@@ -146,6 +146,7 @@ bool_pt argxsym;
curseg = 0; /* text seg, s.b. variable */
symres("__etext");
symres("__segoff");
+ symres("__heap_top");
/* calculate segment and common sizes (sum over loaded modules) */
/* use zero init of segsz[] */
@@ -315,6 +316,11 @@ bool_pt argxsym;
fatalerror("data segment too large for 16bit");
}
+ if( heap_top_value < 0x100 || endoffset > heap_top_value-0x100)
+ heap_top_value = endoffset + 0x8000;
+ if( heap_top_value > 0x10000 && !bits32 ) heap_top_value = 0x10000;
+ setsym("__heap_top", (bin_off_t)heap_top_value);
+
openout(outfilename);
writeheader();
for (modptr = modfirst; modptr != NUL_PTR; modptr = modptr->modnext)
@@ -614,9 +620,6 @@ PRIVATE void writeheader()
if (uzp)
offtocn((char *) &header.a_entry, page_size(),
sizeof header.a_entry);
- if( heap_top_value < 0x100 || endoffset > heap_top_value-0x100)
- heap_top_value = endoffset + 0x8000;
- if( heap_top_value > 0x10000 && !bits32 ) heap_top_value = 0x10000;
offtocn((char *) &header.a_total, (bin_off_t) heap_top_value,
sizeof header.a_total);