summaryrefslogtreecommitdiffstats
path: root/exe.ld
diff options
context:
space:
mode:
Diffstat (limited to 'exe.ld')
-rw-r--r--exe.ld30
1 files changed, 12 insertions, 18 deletions
diff --git a/exe.ld b/exe.ld
index 56363d8..810d39a 100644
--- a/exe.ld
+++ b/exe.ld
@@ -101,37 +101,31 @@ SECTIONS
/* Special DT tags used by elf2exe */
/* Final file size */
- LONG(0x6bb31700);
+ LONG(0x6bb31701);
LONG(___.filesize);
/* Final memory size */
- LONG(0x6bb31701);
- LONG(___.end); /* Final memory size */
-
- /* Seg:off form of entry point */
LONG(0x6bb31702);
- SHORT(___start - "___start!");
- SHORT("___start!" >> 4);
+ LONG(___.end); /* Final memory size */
- /* Seg:off form of the initial stack pointer */
+ /* Segment base of entry point (used to compute CS) */
LONG(0x6bb31703);
- SHORT(___stack_end - "___stack_end!");
- SHORT("___stack_end!" >> 4);
+ LONG("___start!");
- /*
- * Base of the stack (usable as temp storage
- * as it does not need to be zeroed.)
- */
+ /* Segment base of the stack (used to compute SS) */
LONG(0x6bb31704);
- LONG(___stack_start);
+ LONG("___stack_end!");
/*
- * Segment base of the stack
+ * Base of the stack, used to compute SP, and usable
+ * as early temp storage as it does not need to be
+ * zeroed, unlike BSS.
*/
- LONG("___stack_end!");
+ LONG(0x6bb31705);
+ LONG(___stack_start);
/* Size of the stack */
- LONG(0x6bb31705);
+ LONG(0x6bb31706);
LONG(___stack_size);
KEEP(*(.dynamic))