summaryrefslogtreecommitdiff
path: root/lib/linker.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/linker.c')
-rw-r--r--lib/linker.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/linker.c b/lib/linker.c
index b6930e3..0228a9f 100644
--- a/lib/linker.c
+++ b/lib/linker.c
@@ -138,7 +138,7 @@ void addfile(char *nom)
if ((startpoint != -1) && (start != -1)) {
exception(1, _("Startpoint already defined."));
}
- startpoint = start;
+ startpoint = start + textsize;
objects[objindex]->s_text = readword(f);
objects[objindex]->s_data = readword(f);
@@ -284,6 +284,7 @@ void dumpfile(char *nom)
pushcontext(_("Writing headers"));
writeword(0x58454e4e, f);
writeword(nbrsymbs + textsize + datasize + 7, f);
+ writeword(startpoint, f);
writeword(textsize, f);
writeword(datasize, f);
writeword(bsssize, f);