summaryrefslogtreecommitdiff
path: root/dos/getsetsl.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2010-07-19 16:17:04 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2010-07-19 16:20:23 -0700
commitdb8899d1faa6fc6e3ea8b89684e5a623df9909ed (patch)
treeb04a876eb9d9f0c8718831875c92f3aca3b16c77 /dos/getsetsl.c
parentccad6e87e9b9a51f3781cc6e4dc045525c5c5342 (diff)
downloadsyslinux-db8899d1faa6fc6e3ea8b89684e5a623df9909ed.tar.gz
dos: change the link procedure to use negative pointers below DGROUP
Use negative pointer values below DGROUP, i.e. for the .payload segment. This makes it a lot easier to figure out if we are dealing with pointers that shouldn't come from where they do, since the DGROUP and .payload segments no longer overlap, and in fact are congruent. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'dos/getsetsl.c')
-rw-r--r--dos/getsetsl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dos/getsetsl.c b/dos/getsetsl.c
index a48f3df2..5c1dbbda 100644
--- a/dos/getsetsl.c
+++ b/dos/getsetsl.c
@@ -87,7 +87,7 @@ void memcpy_to_sl(void *dst, const void *src, size_t len)
uint16_t seg;
uint16_t off;
- seg = ldlinux_seg + ((size_t)dst >> 4);
+ seg = ds() + ((size_t)dst >> 4);
off = (size_t)dst & 15;
asm volatile("pushw %%es ; "