aboutsummaryrefslogtreecommitdiffstats
path: root/libinstaller
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-25 18:31:13 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-25 18:31:13 -0700
commit48337e3817f884f3ce8e7632b984a564a0703047 (patch)
tree47cf268a0b189cbcb0365cc4ecb2731dae6f1048 /libinstaller
parentd672cdd2bd7622f6dc4db4955214abf4dd7a3b6e (diff)
downloadlwip-48337e3817f884f3ce8e7632b984a564a0703047.tar.gz
lwip-48337e3817f884f3ce8e7632b984a564a0703047.tar.xz
lwip-48337e3817f884f3ce8e7632b984a564a0703047.zip
dos installer: reuse ldlinux_seg
Make ldlinux_seg a global variable, and use it in syslxmod.c. This reduces the size of syslxmod.o fairly significantly. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'libinstaller')
-rw-r--r--libinstaller/syslxmod.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libinstaller/syslxmod.c b/libinstaller/syslxmod.c
index 969ce8b3..4abfb384 100644
--- a/libinstaller/syslxmod.c
+++ b/libinstaller/syslxmod.c
@@ -127,7 +127,7 @@ const char *syslinux_check_bootsect(const void *bs)
*/
#ifdef __MSDOS__
-extern const char __payload_sseg[]; /* Symbol from linker */
+extern uint16_t ldlinux_seg; /* Defined in dos/syslinux.c */
static inline __attribute__((const)) uint16_t ds(void)
{
@@ -140,8 +140,7 @@ static inline void *set_fs(const void *p)
{
uint16_t seg;
- seg = ds() + (size_t)__payload_sseg;
- seg += (size_t)p >> 4;
+ seg = ldlinux_seg + ((size_t)p >> 4);
asm volatile("movw %0,%%fs" : : "rm" (seg));
return (void *)((size_t)p & 0xf);
}