vboot: Fix fuzzer build
LLD is complaining about the symbol vb2_check_padding present
in a discarded section. This is caused by multiple defintions
of vb2_check_padding being present (fuzzers & 2rsa.c) and the
definition in 2rsa.c also being used in the same file.
Fix by marking vb2_check_padding as weak.
BUG=chromium:1062665
TEST=Fuzzer builds work
BRANCH=none
Signed-off-by: Manoj Gupta <manojgupta@google.com>
Change-Id: Id1e2b69cdb35cbd127ba57881a70fc352ea2450a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2108483
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
diff --git a/firmware/2lib/2rsa.c b/firmware/2lib/2rsa.c
index 16edc26..54b00b6 100644
--- a/firmware/2lib/2rsa.c
+++ b/firmware/2lib/2rsa.c
@@ -321,6 +321,7 @@
* @param key Key to take signature and hash algorithms from
* @return VB2_SUCCESS, or non-zero if error.
*/
+test_mockable
vb2_error_t vb2_check_padding(const uint8_t *sig,
const struct vb2_public_key *key)
{