ce55ca2fca
Using the linker's --wrap feature has the downside that it only covers references across object files: If foo.c defines a() and b(), with b calling a, --wrap=a does nothing to that call. Instead, use objcopy to mark a weak and global so it can be overridden by another implementation, but only for files originating in src/. That way mocks - implemented in tests/ - become the source of truth. TEST=Had such an issue with get_log_level() in a follow-up commit, and the mock now takes over. Also, all existing unit tests still pass. Change-Id: I99c6d6e44ecfc73366bf464d9c51c7da3f8db388 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55360 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jakub Czapiga <jacz@semihalf.com> |
||
---|---|---|
.. | ||
_static | ||
acpi | ||
arch | ||
cbfstool | ||
community | ||
contributing | ||
doxygen | ||
drivers | ||
flash_tutorial | ||
getting_started | ||
gfx | ||
ifdtool | ||
infrastructure | ||
Intel | ||
lib | ||
mainboard | ||
northbridge | ||
releases | ||
RFC | ||
security | ||
soc | ||
superio | ||
technotes | ||
tutorial | ||
vendorcode | ||
.gitignore | ||
AMD-S3.txt | ||
beginverbatim.tex | ||
cbfs.txt | ||
codeflow.svg | ||
conf.py | ||
COPYING | ||
coreboot_logo.png | ||
corebootBuildingGuide.tex | ||
distributions.md | ||
Doxyfile.coreboot | ||
Doxyfile.coreboot_simple | ||
endverbatim.tex | ||
gcov.txt | ||
hypertransport.svg | ||
index.md | ||
mainboard_io_trap_handler_sample.c | ||
Makefile | ||
Makefile.sphinx | ||
payloads.md | ||
POSTCODES | ||
util.md |