coreboot/payloads/libpayload/arch/arm
Julius Werner 37513297d3 libpayload: Use Kconfig for architecture memcpy, not weak symbols
Our mechanism to override the default (pure C) memory function
implementations (memset, memcpy, memmove) with architecture-specific
optimized assembly versions doesn't actually work: it turns out that
weak functions don't work as you'd naively expect when you pack them
together with a strong definition from a different object into a static
library. When a linker tries to resolve a symbol from a static library,
it just picks the first one it finds, even if it is weak. It doesn't
evaluate all objects in the library to see if there are other strong
definitions.

To fix this, this patch gets rid of the weak symbols and uses Kconfigs
instead. It adds an optimized memmove() implementation for x86 because
that makes things easier (then all architectures either override all
three functions or none of them). Also remove memcmp() from the
functions that can be overridden for now because nobody ever needed that
anyway.

Change-Id: Iedf9898247f1999e56fde3233fad8b7cb36b1269
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87766
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-05-22 19:27:24 +00:00
..
asmlib.h
cache.c
coreboot.c
cpu.S
eabi_compat.c
exception.c
exception_asm.S
gdb.c
head.S libpayload: Fix the stack and data labels 2023-12-01 02:20:29 +00:00
Kconfig libpayload: Use Kconfig for architecture memcpy, not weak symbols 2025-05-22 19:27:24 +00:00
libpayload.ldscript libpayload: Fix the stack and data labels 2023-12-01 02:20:29 +00:00
main.c
Makefile.mk libpayload: Unify selfboot() implementations 2025-02-11 20:59:57 +00:00
memcpy.S
memmove.S
memset.S
sysinfo.c
timer.c
util.S
virtual.c libpayload: Use unsigned integer for PDG_MASK 2024-08-27 00:29:12 +00:00