diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2016-09-20 13:58:53 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-09-26 11:59:18 -0700 |
commit | 10d5cfe461fe2ef927b5aa0dd34aa39a3d913f3c (patch) | |
tree | d9a651d8d55d173b7d50d510f989e327c4531c20 /firmware | |
parent | d0e3d7e1fab83606acc08036290f989c55068ee7 (diff) | |
download | vboot-10d5cfe461fe2ef927b5aa0dd34aa39a3d913f3c.tar.gz |
bdb: Define RSA symbols non-weakly
Defining these symbols weakly causes the output executable to hit
segmentation fault because ld chooses *UND* symbols over the definition
when they appear in *.a archive:
$ objdump -t build/libvboot_utilbdb.a
bdb.o:
0000000000000000 w *UND* 0000000000000000 bdb_rsa4096_verify
...
rsa.o
000000000000061f w F .text 0000000000000111 bdb_rsa4096_verify
...
This happens regardless whether the symbol is referenced or not;
or whether the object defining the symbol appears earlier than the
reference or not.
BUG=none
BRANCH=none
TEST=make runtests
Change-Id: Ib53a9010f2afdc2ba59369fb145aef4381db30d3
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/387905
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/bdb/bdb.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/firmware/bdb/bdb.h b/firmware/bdb/bdb.h index bf421afb..ef10a19d 100644 --- a/firmware/bdb/bdb.h +++ b/firmware/bdb/bdb.h @@ -163,7 +163,6 @@ const struct bdb_sig *bdb_get_data_sig(const void *buf); * @param size Size of data in bytes * @return 0 if success, non-zero error code if error. */ -__attribute__((weak)) int bdb_sha256(void *digest, const void *buf, size_t size); /** @@ -174,7 +173,6 @@ int bdb_sha256(void *digest, const void *buf, size_t size); * @param digest Digest of signed data (BDB_SHA256_DIGEST bytes) * @return 0 if success, non-zero error code if error. */ -__attribute__((weak)) int bdb_rsa4096_verify(const uint8_t *key_data, const uint8_t *sig, const uint8_t *digest); @@ -187,7 +185,6 @@ int bdb_rsa4096_verify(const uint8_t *key_data, * @param digest Digest of signed data (BDB_SHA256_DIGEST bytes) * @return 0 if success, non-zero error code if error. */ -__attribute__((weak)) int bdb_rsa3072b_verify(const uint8_t *key_data, const uint8_t *sig, const uint8_t *digest); @@ -200,7 +197,6 @@ int bdb_rsa3072b_verify(const uint8_t *key_data, * @param digest Digest of signed data (BDB_SHA256_DIGEST bytes) * @return 0 if success, non-zero error code if error. */ -__attribute__((weak)) int bdb_ecdsa521_verify(const uint8_t *key_data, const uint8_t *sig, const uint8_t *digest); |