diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-06-23 17:21:50 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-06-23 17:21:50 -0700 |
commit | 7edf0a4cc227fc7c7cbe36a95bc2e4cd83414380 (patch) | |
tree | 70b36456c2eb821405b8a453027f45aedca258d6 | |
parent | aefc9dd8f1b069ce8e97e187aabe56b43c69651b (diff) | |
download | syslinux-7edf0a4cc227fc7c7cbe36a95bc2e4cd83414380.tar.gz |
Ugly workaround for bug in GNU ld 2.17
GNU ld 2.17, which is still included with Debian 4.0 (etch),
mishandles PC-relative relocations to an absolute address. Hack
around it by making pm_entry a segment-relative symbol, completely
unnecessarily so.
-rw-r--r-- | core/com32.inc | 13 | ||||
-rw-r--r-- | core/syslinux.ld | 5 |
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) + } } |