rmodtool: correct final memory size calculation
Apparently when I originally wrote this I confused myself to no end.
The code/data of an rmodule has a set memory size which is associated
with the .payload section. The relocation entries may increase the
overall footprint of the memory size if the rmodule has no bss but
a lot of relocations. Therefore, just compare relocation entries size
plus the file size of the .payload section with the memory size of the
paylod section. The .empty section is added only when we have not met
the final target size.
Signed-off-by: Aaron Durbin <email@example.com>
Reviewed-by: Paul Menzel <firstname.lastname@example.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <email@example.com>
1 file changed