]> git.ipfire.org Git - thirdparty/grub.git/commit
util/grub-module-verifierXX: Add function to calculate section headers
authorAlec Brown <alec.r.brown@oracle.com>
Thu, 3 Feb 2022 00:26:57 +0000 (19:26 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 8 Feb 2022 15:06:50 +0000 (16:06 +0100)
commite92633850c99983070bd15f98b53c4c11525f7e0
tree0e21d79a81be53a8115b7ea2af9eaf4b5fdaefda
parentebf32bc4e9561800b9fda59560277cbee6302643
util/grub-module-verifierXX: Add function to calculate section headers

Added the function get_shdr() which returns the section header at a given index
parameter passed into this function. This helps traverse the section header
table and reduces repeated calls to lengthy equations used to obtain section
headers.

Note that it may look as though the argument *arch isn't being used, it's
actually required in order to use the macros grub_target_to_host*(x) which are
unwinded to grub_target_to_host*_real(arch, (x)) based on defines earlier in the
file.

Signed-off-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
util/grub-module-verifierXX.c