Messages in this thread | | | Date | Wed, 26 Jul 2023 17:33:49 +0100 | From | Conor Dooley <> | Subject | Re: [PATCH v2 2/3] riscv/purgatory: do not link with string.o and its dependencies |
| |
On Wed, Jul 26, 2023 at 11:54:00AM +0200, Petr Tesarik wrote: > From: Petr Tesarik <petr.tesarik.ext@huawei.com> > > Linking with this object file makes kexec_file_load(2) fail because of > multiple unknown relocation types: > > - R_RISCV_ADD16, R_RISCV_SUB16: used by alternatives in strcmp() > - R_RISCV_GOT_HI20: used to resolve _ctype in strcasecmp() > > All this hassle is needed for one single call to memcmp() from > verify_sha256_digest() to compare 32 bytes of SHA256 checksum. > > Simply replace this memcmp() call with an explicit loop over those 32 bytes > and remove the need to link with string.o and all the other object files > that provide undefined symbols from that object file. > > Fixes: 838b3e28488f ("RISC-V: Load purgatory in kexec_file") > Signed-off-by: Petr Tesarik <petr.tesarik.ext@huawei.com>
This version keeps the automation happy, Acked-by: Conor Dooley <conor.dooley@microchip.com>
Thanks, Conor. [unhandled content-type:application/pgp-signature] | |