mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 15:37:23 +00:00
6d8962e814
Before this commit, weak symbols were not overridden by non-weak symbols found in archive libraries when linking with recent versions of binutils. As stated in the System V ABI, "the link editor does not extract archive members to resolve undefined weak symbols". This commit changes all Makefiles to use partial linking (ld -r) instead of creating library archives, which forces all symbols to participate in linking, allowing non-weak symbols to override weak symbols as intended. This approach is also used by Linux, from which the gmake function cmd_link_o_target (defined in config.mk and used in all Makefiles) is inspired. The name of each former library archive is preserved except for extensions which change from ".a" to ".o". This commit updates references accordingly where needed, in particular in some linker scripts. This commit reveals board configurations that exclude some features but include source files that depend these disabled features in the build, resulting in undefined symbols. Known such cases include: - disabling CMD_NET but not CMD_NFS; - enabling CONFIG_OF_LIBFDT but not CONFIG_QE. Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com> |
||
---|---|---|
.. | ||
api.c | ||
api_net.c | ||
api_platform-arm.c | ||
api_platform-powerpc.c | ||
api_private.h | ||
api_storage.c | ||
Makefile | ||
README |
U-Boot machine/arch independent API for external apps ===================================================== 1. Main assumptions - there is a single entry point (syscall) to the API - per current design the syscall is a C-callable function in the U-Boot text, which might evolve into a real syscall using machine exception trap once this initial version proves functional - the consumer app is responsible for producing appropriate context (call number and arguments) - upon entry, the syscall dispatches the call to other (existing) U-Boot functional areas like networking or storage operations - consumer application will recognize the API is available by searching a specified (assumed by convention) range of address space for the signature - the U-Boot integral part of the API is meant to be thin and non-intrusive, leaving as much processing as possible on the consumer application side, for example it doesn't keep states, but relies on hints from the app and so on - optional (CONFIG_API) 2. Calls - console related (getc, putc, tstc etc.) - system (reset, platform info) - time (delay, current) - env vars (enumerate all, get, set) - devices (enumerate all, open, close, read, write); currently two classes of devices are recognized and supported: network and storage (ide, scsi, usb etc.) 3. Structure overview - core API, integral part of U-Boot, mandatory - implements the single entry point (mimics UNIX syscall) - glue - entry point at the consumer side, allows to make syscall, mandatory part - helper conveniency wrappers so that consumer app does not have to use the syscall directly, but in a more friendly manner (a la libc calls), optional part - consumer application - calls directly, or leverages the provided glue mid-layer