image: use data_size in cert table header

Since we write the certificate table starting at data_size (not size),
use this value when generating the cert table header.

Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
This commit is contained in:
Jeremy Kerr 2012-10-02 11:22:37 +08:00
parent 63cfc10ce0
commit 142ba5c1b3

View file

@ -493,7 +493,7 @@ int image_write(struct image *image, const char *filename)
/* pad to sizeof(pad)-byte boundary */ /* pad to sizeof(pad)-byte boundary */
padlen = align_up(len, sizeof(pad)) - len; padlen = align_up(len, sizeof(pad)) - len;
image->data_dir_sigtable->addr = image->size; image->data_dir_sigtable->addr = image->data_size;
image->data_dir_sigtable->size = len + padlen; image->data_dir_sigtable->size = len + padlen;
} else { } else {
image->data_dir_sigtable->addr = 0; image->data_dir_sigtable->addr = 0;