Align section ends to page boundaries.

.text, .rodata and .data are allocated in distinct pages so they can be
mapped with their corresponding modes. The end of these sections is the
end of their last page for these purposes.

The measured size is left as the amount of space used as this is the
more useful number when looking into how much memory is actually needed.

Change-Id: I791b3f29138f2021a88f8822ac7eb86938dfb871
diff --git a/build/image/image.ld b/build/image/image.ld
index 4686261..f092458 100644
--- a/build/image/image.ld
+++ b/build/image/image.ld
@@ -48,6 +48,8 @@
 	.text : {
 		*(.text.*)
 	}
+	text_size = ABSOLUTE(. - text_begin);
+	. = ALIGN(4096);
 	text_end = .;
 
 	/*
@@ -97,6 +99,8 @@
 	hftest_end = .;
 	ASSERT((SIZEOF(.hftest) == (DEFINED(hftest_enable) ? SIZEOF(.hftest) : 0)),
 	       "Error: Image includes .hftest section but not HFTEST_ENABLE().")
+	rodata_size = ABSOLUTE(. - rodata_begin);
+	. = ALIGN(4096);
 	rodata_end = .;
 
 	/*
@@ -157,6 +161,8 @@
 	}
 	. = ALIGN(16);
 	bss_end = .;
+	data_size = ABSOLUTE(. - data_begin);
+	. = ALIGN(4096);
 	data_end = .;
 
 	/*
@@ -188,7 +194,4 @@
 	 */
 	bin_size = ABSOLUTE(bin_end - ORIGIN_ADDRESS);
 	image_size = ABSOLUTE(image_end - ORIGIN_ADDRESS);
-	text_size = ABSOLUTE(text_end - text_begin);
-	rodata_size = ABSOLUTE(rodata_end - rodata_begin);
-	data_size = ABSOLUTE(data_end - data_begin);
 }