[syslinux:pathbased] dos: make sure we don't look like a Windows image

syslinux-bot for H. Peter Anvin hpa at zytor.com
Fri Feb 26 10:21:19 PST 2010


Commit-ID:  207ac40c68ca88fb758e806937ad88f52a2cae86
Gitweb:     http://syslinux.zytor.com/commit/207ac40c68ca88fb758e806937ad88f52a2cae86
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Fri, 26 Feb 2010 10:16:48 -0800
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Fri, 26 Feb 2010 10:17:52 -0800

dos: make sure we don't look like a Windows image

Some tools might assume that the reloc offset being 64 automatically
means it's really a Windows file.

Signed-off-by: H. Peter Anvin <hpa at zytor.com>


---
 dos/header.S |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/dos/header.S b/dos/header.S
index e750447..8367078 100644
--- a/dos/header.S
+++ b/dos/header.S
@@ -18,6 +18,12 @@ __header_start:
 		.short	_exe_text_seg	/* CS */
 		.short	__reloc
 		.short	0		/* Overlay number */
+/*
+ * Don't put these fields in unless we actually have an NE or PE image;
+ * some tools might get confused and assume __reloc = 64 automatically
+ * means an NE/PE image or a Windows image of some sort.
+ */
+#if 0
 		.short	0		/* Unknown/pad? */
 		.short	0		/* Unknown/pad? */
 		.short	0		/* Unknown/pad? */
@@ -35,6 +41,8 @@ __header_start:
 		.short	0		/* Unknown/pad? */
 		.short	0		/* Unknown/pad? */
 		.long	0		/* Pointer to Windows PE header */
+#endif
+		.balign 4
 __reloc:
 		.balign	512
 __header_end:



More information about the Syslinux-commits mailing list