aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-02-18 21:08:56 -0800
committerH. Peter Anvin <hpa@zytor.com>2009-02-18 21:08:56 -0800
commit8f5084835e9a9358e3c7f4495ee1fe7fe0221cdd (patch)
treea88983782fe1240bda599560132628bccb36e2b3 /com32/lib
parentc1992328089420c817c070c27172939393cadc9c (diff)
downloadsyslinux.git-8f5084835e9a9358e3c7f4495ee1fe7fe0221cdd.tar.gz
syslinux.git-8f5084835e9a9358e3c7f4495ee1fe7fe0221cdd.tar.xz
syslinux.git-8f5084835e9a9358e3c7f4495ee1fe7fe0221cdd.zip
Constructed data objects can't be common; hack derivative_info
- Constructed data objects can't be common. Earlier version of gcc didn't if the objects were explicitly listed extern, but newer ones need an explicit __attribute__((nocommon)) or -fno-common. - Make syslinux_derivative_info() save the entire reply.
Diffstat (limited to 'com32/lib')
-rw-r--r--com32/lib/syslinux/dsinfo.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/com32/lib/syslinux/dsinfo.c b/com32/lib/syslinux/dsinfo.c
index 6d77a0de..eebbbd3a 100644
--- a/com32/lib/syslinux/dsinfo.c
+++ b/com32/lib/syslinux/dsinfo.c
@@ -34,14 +34,12 @@ union syslinux_derivative_info __syslinux_derivative_info;
void __constructor __syslinux_get_derivative_info(void)
{
static com32sys_t reg;
+ com32sys_t * const r = &__syslinux_derivative_info.rr.r;
reg.eax.w[0] = 0x000A;
- __intcall(0x22, &reg, &reg);
+ __intcall(0x22, &reg, r);
- __syslinux_derivative_info.r.ax = reg.eax.w[0];
- __syslinux_derivative_info.r.cx = reg.ecx.w[0];
- __syslinux_derivative_info.r.dx = reg.edx.w[0];
- __syslinux_derivative_info.r.esbx = MK_PTR(reg.es, reg.ebx.w[0]);
- __syslinux_derivative_info.r.fssi = MK_PTR(reg.fs, reg.esi.w[0]);
- __syslinux_derivative_info.r.gsdi = MK_PTR(reg.gs, reg.edi.w[0]);
+ __syslinux_derivative_info.r.esbx = MK_PTR(r->es, r->ebx.w[0]);
+ __syslinux_derivative_info.r.fssi = MK_PTR(r->fs, r->esi.w[0]);
+ __syslinux_derivative_info.r.gsdi = MK_PTR(r->gs, r->edi.w[0]);
}