aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/com32.inc13
-rw-r--r--core/syslinux.ld5
2 files changed, 16 insertions, 2 deletions
diff --git a/core/com32.inc b/core/com32.inc
index 99954206..bd6d727a 100644
--- a/core/com32.inc
+++ b/core/com32.inc
@@ -26,8 +26,17 @@
; "mov ax,0x4cff; int 0x21" in 16-bit mode. This will abort the
; program with an error if run in 16-bit mode.
;
-pm_idt: equ 0x100000
-pm_entry: equ 0x101000
+
+ ; We need to make this a proper section rather
+ ; than using absolute numbers, in order to work
+ ; around a bug in GNU ld 2.17, which is still in
+ ; use as of this writing in the form of Debian
+ ; 4.0 (etch).
+ bits 32
+ section .com32 exec write nobits align=16
+pm_idt equ 0x100000 ; Needs to be absolute...
+ resb 4096
+pm_entry: ; Needs to not be...
bits 16
section .data
diff --git a/core/syslinux.ld b/core/syslinux.ld
index 28ef44e9..f59e5b15 100644
--- a/core/syslinux.ld
+++ b/core/syslinux.ld
@@ -118,4 +118,9 @@ SECTIONS
__bss1_dwords = (__bss1_len + 3) >> 2;
. = ASSERT(__bss1_end <= 0x10000, "64K overflow");
+
+ . = 0x100000;
+ .com32 : {
+ *(.com32)
+ }
}