fips: Integrity check improvement, with only loadable segments.
* configure.ac (READELF): Check the tool. * src/Makefile.am (libgcrypt.so.hmac): Use genhmac.sh with hmac256. * src/fips.c (get_file_offsets): Rename from get_file_offset. Determine the OFFSET2 at the end of loadable segments, too. Add fixup of the ELF header to exclude section information. (hmac256_check): Finish scanning at the end of loadble segments. * src/genhmac.sh: New.
Backport master commit of:
9dcf9305962b90febdf2d7cc73b49feadbf6a01f
This change fixes the build with ld.gold.
- GnuPG-bug-id: T5835
- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>