1# 2# Plugin Support 3# 4 5obj-y += loader.o 6obj-y += core.o 7obj-y += api.o 8 9# Abuse -libs suffix to only link with --dynamic-list/-exported_symbols_list 10# when the final binary includes the plugin object. 11# 12# Note that simply setting LDFLAGS is not enough: we build binaries that 13# never link plugin.o, and the linker might fail (at least ld64 does) 14# if the symbols in the list are not in the output binary. 15ifdef CONFIG_HAS_LD_DYNAMIC_LIST 16api.o-libs := -Wl,--dynamic-list=$(BUILD_DIR)/qemu-plugins-ld.symbols 17else 18ifdef CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST 19api.o-libs := -Wl,-exported_symbols_list,$(BUILD_DIR)/qemu-plugins-ld64.symbols 20endif 21endif 22