aboutsummaryrefslogtreecommitdiffstats
path: root/libinstaller
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 /libinstaller
parentccad6e87e9b9a51f3781cc6e4dc045525c5c5342 (diff)
downloadsyslinux-db8899d1faa6fc6e3ea8b89684e5a623df9909ed.tar.gz
syslinux-db8899d1faa6fc6e3ea8b89684e5a623df9909ed.tar.xz
syslinux-db8899d1faa6fc6e3ea8b89684e5a623df9909ed.zip
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 'libinstaller')
-rw-r--r--libinstaller/syslxint.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/libinstaller/syslxint.h b/libinstaller/syslxint.h
index f16c2e5c..b8e872a7 100644
--- a/libinstaller/syslxint.h
+++ b/libinstaller/syslxint.h
@@ -111,8 +111,6 @@ static inline void set_64(uint64_t *p, uint64_t v)
*/
#ifdef __MSDOS__
-extern uint16_t ldlinux_seg; /* Defined in dos/syslinux.c */
-
static inline __attribute__ ((const))
uint16_t ds(void)
{
@@ -125,7 +123,7 @@ static inline void *set_fs(const void *p)
{
uint16_t seg;
- seg = ldlinux_seg + ((size_t) p >> 4);
+ seg = ds() + ((size_t) p >> 4);
asm volatile ("movw %0,%%fs"::"rm" (seg));
return (void *)((size_t) p & 0xf);
}