From fc7c93a512f03a4ac912d4c16c3e601e199864a2 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 27 Feb 2009 07:48:07 -0800 Subject: [PATCH] isohdpfx: work around gas/ld miscompilation Some, unknown, version of gas or ld miscompiles a relative jump to an absolute symbol, resulting in a broken isohybrid. Implement a workaround for it by using a far jmp, which is absolute. Fortunately, the isohybrid prefix is one of the very few boot sectors we have which isn't short on space. --- mbr/isohdpfx.S | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mbr/isohdpfx.S b/mbr/isohdpfx.S index 9a97a5e..ecb3a1a 100644 --- a/mbr/isohdpfx.S +++ b/mbr/isohdpfx.S @@ -143,7 +143,15 @@ next: cli movw $heads, %sp - jmp isolinux_start_hybrid + + /* + * Use a ljmpw here to work around a bug in some unknown version + * of gas or ld when it comes to jumping to an absolute symbol... + * + * Look more closely into it if we ever are short on space. + */ + ljmpw $0, $isolinux_start_hybrid + jmpw *%si bad_signature: call error -- 2.7.4