mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-27 03:33:50 +00:00
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>
This commit is contained in:
committed by
chrome-bot
parent
d0e3d7e1fa
commit
10d5cfe461
1
Makefile
1
Makefile
@@ -377,6 +377,7 @@ FWLIB21_SRCS = \
|
||||
|
||||
BDBLIB_SRCS = \
|
||||
firmware/bdb/bdb.c \
|
||||
firmware/bdb/ecdsa.c \
|
||||
firmware/bdb/misc.c \
|
||||
firmware/bdb/rsa.c \
|
||||
firmware/bdb/secrets.c \
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user