aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gfxboot
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-11-14 13:12:28 -0800
committerH. Peter Anvin <hpa@zytor.com>2010-11-14 13:12:28 -0800
commit51d2e40990ce9d2360300a81562b1b2f7610d336 (patch)
treea2ed267442a84ef8cbe1862dafd45f1e225c54e9 /com32/gfxboot
parent9cc7b5988734fb4dcdc21f10c71bd58d89e2f41b (diff)
downloadsyslinux-51d2e40990ce9d2360300a81562b1b2f7610d336.tar.gz
syslinux-51d2e40990ce9d2360300a81562b1b2f7610d336.tar.xz
syslinux-51d2e40990ce9d2360300a81562b1b2f7610d336.zip
gfxboot: use a character array for an absolute symbol
The best way to access an absolute symbol is "extern const char foo[];" -- older gccs let you get away with "extern void" but gcc 4.5 chokes on it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/gfxboot')
-rw-r--r--com32/gfxboot/gfxboot.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/com32/gfxboot/gfxboot.c b/com32/gfxboot/gfxboot.c
index 2323f8ed..65b2d498 100644
--- a/com32/gfxboot/gfxboot.c
+++ b/com32/gfxboot/gfxboot.c
@@ -61,7 +61,7 @@
#define GFX_CB_PASSWORD_DONE 11
// real mode code chunk, will be placed into bounce buffer
-extern void realmode_callback_start, realmode_callback_end;
+extern const char realmode_callback_start[], realmode_callback_end[];
// gets in the way
#undef linux
@@ -557,7 +557,7 @@ int gfx_init(char *file)
gfx_config.file = gfx_config.archive_start + file_start;
- u = &realmode_callback_end - &realmode_callback_start;
+ u = realmode_callback_end - realmode_callback_start;
u = (u + REALMODE_BUF_SIZE + 0xf) & ~0xf;
if(u + code_size > lowmem_size) {
@@ -565,7 +565,8 @@ int gfx_init(char *file)
return 1;
}
- memcpy(lowmem + REALMODE_BUF_SIZE, &realmode_callback_start, &realmode_callback_end - &realmode_callback_start);
+ memcpy(lowmem + REALMODE_BUF_SIZE, realmode_callback_start,
+ realmode_callback_end - realmode_callback_start);
// fill in buffer size and location
*(uint16_t *) (lowmem + REALMODE_BUF_SIZE) = REALMODE_BUF_SIZE;