diff options
author | Ben Collins <bcollins@ubuntu.com> | 2006-10-15 04:14:03 +0000 |
---|---|---|
committer | Ben Collins <bcollins@ubuntu.com> | 2006-10-15 04:14:03 +0000 |
commit | 9ff7a725830f100df590e26f91038cf7f87cea9b (patch) | |
tree | 1e2391fab927266663ffff7dfd24fe518b1a6778 | |
parent | f534d8a7b78ad5c8b178ff77e70c3d38ba910a1f (diff) | |
download | silo-9ff7a725830f100df590e26f91038cf7f87cea9b.tar.gz |
[general] Fix all compiler warnings.
Found one bug in ext2 code while I was at it. Not sure if it will affect
anything or not.
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
-rw-r--r-- | Rules.make | 9 | ||||
-rw-r--r-- | common/inflate.c | 16 | ||||
-rw-r--r-- | first-isofs/isofs.c | 9 | ||||
-rw-r--r-- | include/ext2fs/ext2fs.h | 2 | ||||
-rw-r--r-- | include/silo.h | 4 | ||||
-rw-r--r-- | second/decomp.c | 12 | ||||
-rw-r--r-- | second/file.c | 26 | ||||
-rw-r--r-- | second/file.h | 2 | ||||
-rw-r--r-- | second/fs/ext2.c | 2 | ||||
-rw-r--r-- | second/fs/isofs.c | 5 | ||||
-rw-r--r-- | second/ls.c | 14 | ||||
-rw-r--r-- | second/main.c | 37 | ||||
-rw-r--r-- | second/misc.c | 4 | ||||
-rw-r--r-- | second/timer.c | 2 | ||||
-rw-r--r-- | second/util.c | 1 | ||||
-rw-r--r-- | silo/silo.c | 11 | ||||
-rw-r--r-- | tilo/tilo.c | 6 |
17 files changed, 92 insertions, 70 deletions
@@ -13,10 +13,17 @@ BIN2H=../common/bin2h SMALL_RELOC=0x280000 LARGE_RELOC=0x380000 -CFLAGS=-Os -Wall -I. -I../include -fomit-frame-pointer \ +cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ + > /dev/null 2>&1; then echo "y"; else echo "n"; fi;) + +CFLAGS = -Os -Wall -I. -I../include -fomit-frame-pointer \ -fno-strict-aliasing -DSMALL_RELOC=$(SMALL_RELOC) \ -DLARGE_RELOC=$(LARGE_RELOC) +ifeq ($(call cc-option-yn, -fno-stack-protector),y) +CFLAGS += -fno-stack-protector +endif + OPSYS=$(shell uname) OSREV=$(shell uname -r) ifeq ($(OPSYS),SunOS) diff --git a/common/inflate.c b/common/inflate.c index d6ea57f..4fa9d82 100644 --- a/common/inflate.c +++ b/common/inflate.c @@ -958,13 +958,17 @@ static int gunzip (void) if ((flags & RESERVED) != 0) { error ("Input has invalid flags"); } - (ulg) get_byte (); /* Get timestamp */ - (ulg) get_byte (); - (ulg) get_byte (); - (ulg) get_byte (); - (void) get_byte (); /* Ignore extra flags for the moment */ - (void) get_byte (); /* Ignore OS type for the moment */ + /* Ignore timestamp */ + (void) get_byte (); + (void) get_byte (); + (void) get_byte (); + (void) get_byte (); + + /* Ignore extra flags for the moment */ + (void) get_byte (); + /* Ignore OS type for the moment */ + (void) get_byte (); if ((flags & EXTRA_FIELD) != 0) { unsigned len = (unsigned) get_byte (); diff --git a/first-isofs/isofs.c b/first-isofs/isofs.c index 46176c7..d7a603b 100644 --- a/first-isofs/isofs.c +++ b/first-isofs/isofs.c @@ -281,8 +281,9 @@ static void parse_rr (unsigned char *chr, unsigned char *end, if (cd_read_block(cont_extent, 1, sect_buf) < 0) return; - parse_rr(§_buf[cont_offset], §_buf[cont_offset + - cont_size - 3], name, symlink); + parse_rr((unsigned char *)(§_buf[cont_offset]), + (unsigned char *)(§_buf[cont_offset + + cont_size - 3]), name, symlink); } } @@ -330,7 +331,7 @@ static int isofs_lookup (struct isofs_inode *dir, const char *name, rr++; *symlink = 0; - parse_rr(rr, &buffer[i-3], namebuf, symlink); + parse_rr(rr, (unsigned char *)(&buffer[i-3]), namebuf, symlink); if (idr->name_len[0] == 1 && !idr->name[0]) { namebuf[0] = '.'; @@ -466,7 +467,7 @@ char *cd_main (struct linux_romvec *promvec, void *cifh, void *cifs) prom_putchar(sinfo->id); - return dest; + return (char *)dest; } diff --git a/include/ext2fs/ext2fs.h b/include/ext2fs/ext2fs.h index 0c052f6..55aed7d 100644 --- a/include/ext2fs/ext2fs.h +++ b/include/ext2fs/ext2fs.h @@ -868,6 +868,8 @@ extern int ext2fs_test_ib_dirty(ext2_filsys fs); extern int ext2fs_test_bb_dirty(ext2_filsys fs); extern int ext2fs_group_of_blk(ext2_filsys fs, blk_t blk); extern int ext2fs_group_of_ino(ext2_filsys fs, ino_t ino); +extern blk_t ext2fs_inode_data_blocks(ext2_filsys fs, + struct ext2_inode *inode); /* * The actual inlined functions definitions themselves... diff --git a/include/silo.h b/include/silo.h index 0aa05dc..51c62e7 100644 --- a/include/silo.h +++ b/include/silo.h @@ -94,7 +94,9 @@ void free (void *); void mark (void **); void release (void *); /* file.c */ -int silo_load_file(char *, int, char *, char *, char *, int *, int, void (*)(int, char **, char **)); +int silo_load_file(char *, int, char *, unsigned char *, + unsigned char *, int *, int, + void (*)(int, char **, char **)); /* misc.c */ void silo_fatal(const char *); char *silo_get_bootargs(int); diff --git a/second/decomp.c b/second/decomp.c index 262f399..df4786c 100644 --- a/second/decomp.c +++ b/second/decomp.c @@ -111,8 +111,8 @@ int decompress (char *outptr, char *outptrlim, unsigned char (*get_input) (void) gzip_release (&save_ptr); return -1; } - output_data = outptr; - output_limit = outptrlim; + output_data = (uch *)outptr; + output_limit = (uch *)outptrlim; get_input_fun = get_input; unget_input_fun = unget_input; bytes_out = 0; @@ -140,7 +140,7 @@ static void unget_input(void) extern char main_text_start, main_text_end, main_data_start, main_data_end, main_rodata_start, main_rodata_end, __bss_start; /* This has to be in data section, so that it does not get cleared. See crt0.S for details. */ -char *gzminpi = (char *)0xdeadbeef; +unsigned char *gzminpi = (unsigned char *)0xdeadbeef; extern int bootmain(void); @@ -163,7 +163,7 @@ unsigned my_main(struct linux_romvec *promvec, void *cifh, void *cifs) pt++; while (*pt) pt++; pt++; - gzminpi = (char *)pt; + gzminpi = (unsigned char *)pt; } gzminp = gzminpi; if (decompress ((char *)0x200000, (char *)&_start, get_input, unget_input) == -1) { @@ -174,7 +174,7 @@ unsigned my_main(struct linux_romvec *promvec, void *cifh, void *cifs) memcpy (&main_rodata_start, (char *)0x200000 + (&main_text_end - &main_text_start), &main_rodata_end - &main_rodata_start); memcpy (&main_data_start, (char *)0x200000 + (&main_text_end - &main_text_start) + (&main_rodata_end - &main_rodata_start), &main_data_end - &main_data_start); if (cifh) { - unsigned char *cp = (char *)LARGE_RELOC; + unsigned char *cp = (unsigned char *)LARGE_RELOC; unsigned short *pt = (unsigned short *)((char *)0x200000 + (&main_text_end - &main_text_start) + (&main_rodata_end - &main_rodata_start) + (&main_data_end - &main_data_start)); @@ -184,7 +184,7 @@ unsigned my_main(struct linux_romvec *promvec, void *cifh, void *cifs) *cp += 4; } pt++; - cp = (char *)LARGE_RELOC; + cp = (unsigned char *)LARGE_RELOC; while (*pt) { cp += *pt; pt++; diff --git a/second/file.c b/second/file.c index f135345..87b0066 100644 --- a/second/file.c +++ b/second/file.c @@ -27,14 +27,14 @@ ext2_filsys fs = 0; unsigned int bs; -unsigned char *filebuffer; +void *filebuffer; ino_t root, cwd; static int do_gunzip = 0; static unsigned int *gzipped_blocks; static unsigned int *cur_gzipped_block; -static unsigned char *filelimit; +static char *filelimit; static int first_block; static int block_no; static int block_cnt; @@ -69,14 +69,14 @@ void register_silo_inode (unsigned int mtime, unsigned int size, const char *symlink) { struct silo_inode *sino = (struct silo_inode *)filebuffer; - unsigned char *p; + void *p; int name_len = strlen(name); if (match != NULL) if (strlen(match) > name_len || strncmp(match, name, strlen(match))) return; - strncpy(sino->name, name, name_len); + strncpy((char *)sino->name, name, name_len); sino->name[name_len] = 0; sino->mtime = mtime; sino->size = size; @@ -84,10 +84,10 @@ void register_silo_inode (unsigned int mtime, unsigned int size, sino->uid = uid; sino->gid = gid; - p = strchr (sino->name, 0) + 1; + p = strchr((char *)sino->name, 0) + 1; if (symlink) { - strncpy (p, symlink, size); - p[size] = 0; + strncpy ((char *)p, symlink, size); + ((char *)p)[size] = 0; p += size + 1; } if ((long)p & 3) p += 4 - ((long)p & 3); @@ -192,7 +192,7 @@ int dump_block (blk_t * blocknr, int blockcnt) } last_blockcnt = -1; } - if (filebuffer + (block_cnt + ((*blocknr) ? (blockcnt - last_blockcnt - 1) : 0)) * bs > filelimit) { + if ((char *)filebuffer + (block_cnt + ((*blocknr) ? (blockcnt - last_blockcnt - 1) : 0)) * bs > filelimit) { silo_fatal("Image too large to fit in destination"); return BLOCK_ABORT; } @@ -201,7 +201,9 @@ int dump_block (blk_t * blocknr, int blockcnt) if (first_block) { first_block = 0; last_blockcnt = 0; - if (*filebuffer == 037 && (filebuffer[1] == 0213 || filebuffer[1] == 0236)) { /* gzip magic */ + if (*(unsigned char *)filebuffer == 037 && + (((unsigned char *)filebuffer)[1] == 0213 || + ((unsigned char *)filebuffer)[1] == 0236)) { /* gzip magic */ unsigned long sa = (unsigned long)&_start; gunzip_buffer = malloc (16 * bs); memcpy (gunzip_buffer, filebuffer, bs); @@ -321,8 +323,8 @@ static int dump_device_range (char *filename, char *bogusdev, int *len, return 0; } -int silo_load_file(char *device, int partno, char *filename, char *buffer, - char *limit, int *len, int cmd, +int silo_load_file(char *device, int partno, char *filename, unsigned char *buffer, + unsigned char *limit, int *len, int cmd, void (*lenfunc)(int, char **, char **)) { struct silo_inode *sino; @@ -359,7 +361,7 @@ int silo_load_file(char *device, int partno, char *filename, char *buffer, do_rotate = 1; filebuffer = buffer; - filelimit = limit; + filelimit = (char *)limit; if (*filename == '[') { if (cmd & LOADFILE_LS) { diff --git a/second/file.h b/second/file.h index f740de7..c710dcc 100644 --- a/second/file.h +++ b/second/file.h @@ -24,7 +24,7 @@ typedef int FILE; extern unsigned int bs; /* Block Size */ extern io_manager silo_io_manager; /* The Filesystem I/O Manager */ -extern unsigned char *filebuffer; +extern void *filebuffer; extern ext2_filsys fs; /* Generic filesystem */ extern ino_t root, cwd; /* root and cwd for current fs */ extern int solaris; diff --git a/second/fs/ext2.c b/second/fs/ext2.c index a341909..028f77e 100644 --- a/second/fs/ext2.c +++ b/second/fs/ext2.c @@ -91,7 +91,7 @@ static int ls_ext2_proc(struct ext2_dir_entry *dirent, int offset, if (LINUX_S_ISLNK (ino.i_mode)) { sl = 1; - if (ext2fs_inode_data_blocks(fs, ino)) { + if (ext2fs_inode_data_blocks(fs, &ino)) { if (io_channel_read_blk(fs->io, ino.i_block[0], 1, symlink)) ino.i_size = 0; } else { diff --git a/second/fs/isofs.c b/second/fs/isofs.c index d9957c1..c743a00 100644 --- a/second/fs/isofs.c +++ b/second/fs/isofs.c @@ -259,7 +259,8 @@ static void parse_rr (isofs_filsys fs, unsigned char *chr, unsigned char *end, char *sect = alloca (2048); if (io_channel_read_blk (fs->io, cont_extent, 1, sect)) return; - parse_rr (fs, § [cont_offset], § [cont_offset + cont_size - 3], + parse_rr (fs, (unsigned char *)(§[cont_offset]), + (unsigned char *)(§[cont_offset + cont_size - 3]), name, symlink, sino); } } @@ -307,7 +308,7 @@ static int isofs_lookup (isofs_filsys fs, struct isofs_inode *dir, *symlink = 0; memset(&sino, 0, sizeof(struct silo_inode)); - parse_rr (fs, rr, &buffer[i-3], namebuf, symlink, &sino); + parse_rr (fs, rr, (unsigned char *)(&buffer[i-3]), namebuf, symlink, &sino); if (idr->name_len[0] == 1 && !idr->name[0]) strcpy(namebuf, "."); diff --git a/second/ls.c b/second/ls.c index f69661b..6b7913b 100644 --- a/second/ls.c +++ b/second/ls.c @@ -31,12 +31,12 @@ int ls_opt = 0; static int do_ls_cmp (struct silo_inode *a, struct silo_inode *b) { int ret; - ret = strcmp (a->name, b->name); + ret = strcmp ((char *)a->name, (char *)b->name); if (ret) { - if (!strcmp (a->name, ".")) return -1; - if (!strcmp (b->name, ".")) return 1; - if (!strcmp (a->name, "..")) return -1; - if (!strcmp (b->name, "..")) return 1; + if (!strcmp ((char *)a->name, ".")) return -1; + if (!strcmp ((char *)b->name, ".")) return 1; + if (!strcmp ((char *)a->name, "..")) return -1; + if (!strcmp ((char *)b->name, "..")) return 1; } if (ls_opt & LSOPT_T) { if (a->mtime < b->mtime) @@ -202,7 +202,7 @@ int do_ls (unsigned char *buf, int *tab_ambiguous) print_number (min, 2, '0'); printf (" %d %s", year, array[i]->name); if (LINUX_S_ISLNK (array[i]->mode)) { - q = strchr (array[i]->name, 0) + 1; + q = strchr ((char *)array[i]->name, 0) + 1; if (*q) printf (" -> %s", q); } printf ("\n"); @@ -216,7 +216,7 @@ int do_ls (unsigned char *buf, int *tab_ambiguous) for (i = 0; i < n; i++) { printf ("%s", array[i]->name); - j = 19 - strlen(array[i]->name); + j = 19 - strlen((char *)array[i]->name); if ((i & 3) == 3 || i == n - 1) printf ("\n"); else diff --git a/second/main.c b/second/main.c index 9609d89..d5285bb 100644 --- a/second/main.c +++ b/second/main.c @@ -55,7 +55,7 @@ struct HdrS_struct { /* This has to be first initialized variable in main.c */ -extern unsigned char silo_conf[256]; +extern char silo_conf[256]; extern unsigned char silo_conf_part, silo_conf_parts[32], raid_dsk_number; int useconf = 0; @@ -871,7 +871,7 @@ static void initrd_lenfunc (int len, char **filebuffer, char **filelimit) initrd_phys, initrd_start); } -static int parse_executable (char *base, int image_len, unsigned int *poff, +static int parse_executable (unsigned char *base, int image_len, unsigned int *poff, int *plen, unsigned *pstart, char *image_name) { int isfile = 0; @@ -889,7 +889,7 @@ static int parse_executable (char *base, int image_len, unsigned int *poff, /* the kernel) so we check if it is an executable file, either */ /* an a.out or an elf binary */ - hp.b = base; + hp.b = (char *)base; if (hp.a->magic == 0x01030107) { if (solaris) { printf ("\nYour Solaris `ufsboot' is not an ELF image. Try again.\n"); @@ -1043,7 +1043,7 @@ int bootmain (void) int len = 0, image_len; char *kname, *params, *device; char *proll = 0; - char *image_base = (char *) 0x4000; + unsigned char *image_base = (unsigned char *) 0x4000; char *kernel_params; int part; int isfile, fileok = 0; @@ -1095,7 +1095,7 @@ int bootmain (void) if (!fileok || (unsigned) len >= 65535) printf ("\nCouldn't load %s\n", silo_conf); else { - if (!cfg_parse (silo_conf, (unsigned char *) 0x4000, len)) { + if (!cfg_parse (silo_conf, (char *) 0x4000, len)) { char *p, *q; int len = 0; int defpart = -1; @@ -1180,11 +1180,12 @@ try_again: printf ("\nProll not found.... try again\n"); continue; } - if (!parse_executable ((char *)0x4000, image_len, &off, &len, NULL, proll)) + if (!parse_executable ((unsigned char *)0x4000, image_len, &off, + &len, NULL, proll)) continue; memcpy ((char *) 0x4000, ((char *) 0x4000) + off, len); - image_base = (char *) 0x40000; + image_base = (unsigned char *) 0x40000; if (!silo_load_file(device, part, kname, image_base, (unsigned char *) &_start, &image_len, LOADFILE_GZIP, 0)) { @@ -1197,19 +1198,19 @@ try_again: ret_offset = 0x4000; } else { - char *image_end = (char *)&_start; + unsigned char *image_end = (unsigned char *)&_start; /* See if we can use some extra memory for the kernel */ if (!load_cmd) { unsigned int size; - char *mem; + unsigned char *mem; size = 0x800000; - mem = image_memory_find(size); + mem = (unsigned char *)image_memory_find(size); if (!mem) { size = 0x400000; - mem = image_memory_find(size); + mem = (unsigned char *)image_memory_find(size); } if (mem) { @@ -1260,9 +1261,9 @@ try_again: memcpy (image_base, image_base + off, len); hdrs = (struct HdrS_struct *) - silo_find_linux_HdrS(image_base, image_len); + silo_find_linux_HdrS((char *)image_base, image_len); - if (hdrs && hdrs->ver < 0x300 && image_base != (char *)0x4000) { + if (hdrs && hdrs->ver < 0x300 && image_base != (unsigned char *)0x4000) { /* Kernel doesn't support being loaded to other than * phys_base, so let's try to copy it down there. */ if ((unsigned int)&_start - 0x4000 < len) { @@ -1279,12 +1280,12 @@ try_again: /* Ok, it fits, so copy it down there */ memcpy ((char *)0x4000, image_base, len); - image_base = (char *)0x4000; + image_base = (unsigned char *)0x4000; /* Readjust some things */ ret_offset = 0x4000; hdrs = (struct HdrS_struct *) - silo_find_linux_HdrS(image_base, image_len); + silo_find_linux_HdrS((char *)image_base, image_len); printf("done.\n"); } @@ -1386,8 +1387,8 @@ try_again: if (!initrd_kname) break; if (!initrd_device) initrd_device = initrd_defdevice; if (!silo_load_file(initrd_device, initrd_partno, - initrd_kname, initrd_cur, - initrd_limit, &len, 0, 0)) + initrd_kname, (unsigned char *)initrd_cur, + (unsigned char *)initrd_limit, &len, 0, 0)) break; initrd_cur += len; if (!c) { @@ -1432,7 +1433,7 @@ try_again: if (initrd_kname) { if (!initrd_device) initrd_device = initrd_defdevice; if (silo_load_file(initrd_device, initrd_partno, - initrd_kname, (char *) 0x300000, + initrd_kname, (unsigned char *) 0x300000, (unsigned char *) LARGE_RELOC, 0, 0, initrd_lenfunc)) { extern unsigned long long sun4u_initrd_phys; diff --git a/second/misc.c b/second/misc.c index 2763c45..163738e 100644 --- a/second/misc.c +++ b/second/misc.c @@ -309,12 +309,12 @@ unsigned char *silo_find_linux_HdrS(char *base, int len) q = base+8; if (*q == 'H' && q[1] == 'd' && q[2] == 'r' && q[3] == 'S') - return q; + return (unsigned char *)q; if (p >= base + len || p <= base) return 0; for (q = p + 512; p < q; p += 4) { if (*p == 'H' && p[1] == 'd' && p[2] == 'r' && p[3] == 'S') - return p; + return (unsigned char *)p; } return 0; } diff --git a/second/timer.c b/second/timer.c index 73f6b69..51e928e 100644 --- a/second/timer.c +++ b/second/timer.c @@ -216,7 +216,7 @@ void close_timer () if (addr_to_free == (unsigned char *)0xffffffff) sun4c_unmapio (TICKER_VIRTUAL); else - (*romvec->pv_v2devops.v2_dumb_munmap)(addr_to_free, len_to_free); + (*romvec->pv_v2devops.v2_dumb_munmap)((char *)addr_to_free, len_to_free); addr_to_free = 0; } } diff --git a/second/util.c b/second/util.c index edde52c..67c9bca 100644 --- a/second/util.c +++ b/second/util.c @@ -20,6 +20,7 @@ #include <stdio.h> #include <stdlib.h> #include <ctype.h> +#include <string.h> FILE *f, *e; unsigned char buffer[2048]; diff --git a/silo/silo.c b/silo/silo.c index ea45dab..8b21963 100644 --- a/silo/silo.c +++ b/silo/silo.c @@ -138,8 +138,8 @@ struct sun_disklabel { enum typeenum { TYPE_UNKNOWN, TYPE_SCSI, TYPE_IDE }; struct hwdevice { - unsigned char *wholedev; - unsigned char *dev; + char *wholedev; + char *dev; enum typeenum type; int id; int part; @@ -242,7 +242,7 @@ void read_sb (struct hwdevice *hwdev) int i; hwdev->partat0 = 0; - if ((fd = devopen (hwdev->dev, O_RDONLY)) == -1) + if ((fd = devopen ((char *)hwdev->dev, O_RDONLY)) == -1) silo_fatal("Cannot open superblock on %s", hwdev->dev); hwdev->bs = check_fs (fd); if (hwdev->bs == (unsigned short)-1) @@ -481,7 +481,8 @@ void write_block_device (struct hwdevice *hwdev) __u32 tmp; unsigned char part; - if ((fd = devopen (masterboot ? hwdev->wholedev : hwdev->dev, O_RDWR)) == -1) + if ((fd = devopen (masterboot ? hwdev->wholedev : hwdev->dev, + O_RDWR)) == -1) silo_fatal("Cannot open %s", hwdev->dev); if (flash_image) off = IEEE32_OFFSET; else if (floppy_image) off = 1020 + 512 - 4; @@ -552,7 +553,7 @@ void write_block_tables (struct hwdevice *hwdev, char *filename, char *config_fi unsigned char partno; unsigned char partat0; unsigned char raid_dsk_number; - unsigned char silo_conf[256]; + char silo_conf[256]; unsigned char silover[8]; unsigned int len; unsigned char partnos[32]; diff --git a/tilo/tilo.c b/tilo/tilo.c index a6ae3e9..d9a749d 100644 --- a/tilo/tilo.c +++ b/tilo/tilo.c @@ -118,8 +118,8 @@ int decompress (char *outptr, char *outptrlim, unsigned char (*get_input) (void) gzip_release (&save_ptr); return -1; } - output_data = outptr; - output_limit = outptrlim; + output_data = (unsigned char *)outptr; + output_limit = (unsigned char *)outptrlim; get_input_fun = get_input; unget_input_fun = unget_input; bytes_out = 0; @@ -209,7 +209,7 @@ int kernel_number; memmove (moved_ramdisk, orig_code + image_table[ROOT_IMAGE].packed_start, image_table[ROOT_IMAGE].packed_len); memmove (moved_kernel, orig_code + image_table[kernel_number].packed_start, image_table[kernel_number].packed_len); - gzminp = (char*) moved_kernel; /* decompress kernel */ + gzminp = (unsigned char *)moved_kernel; /* decompress kernel */ kernel_base = (char*) 0x4000; if (decompress (kernel_base, kernel_base + ((image_table[kernel_number].unpacked_len |