F: scripts/depdirs-rule.sh
F: scripts/gen-build-mk.sh
F: scripts/gen-config-h.sh
+F: scripts/merge-maps.sh
F: scripts/relpath.sh
F: doc/build-sdk-quick.txt
F: doc/guides/prog_guide/build_app.rst
else
LIB_ONE := lib$(RTE_LIBNAME).a
endif
+COMBINED_MAP=$(BUILDDIR)/lib/libdpdk.map
+COMBINED_LDFLAGS += --version-script=$(COMBINED_MAP)
endif
.PHONY:sharelib
# Override the definition of LD here, since we're linking with CC
LD := $(CC) $(CPU_CFLAGS)
O_TO_S = $(LD) $(call linkerprefix,$(CPU_LDFLAGS)) \
+ $(call linkerprefix,$(COMBINED_LDFLAGS)) \
-shared $(OBJS) -o $(RTE_OUTPUT)/lib/$(LIB_ONE)
else
-O_TO_S = $(LD) $(CPU_LDFLAGS) \
+O_TO_S = $(LD) $(CPU_LDFLAGS) $(COMBINED_LDFLAGS) \
-shared $(OBJS) -o $(RTE_OUTPUT)/lib/$(LIB_ONE)
endif
ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
$(LIB_ONE): FORCE
@[ -d $(dir $@) ] || mkdir -p $(dir $@)
+ @$(SRCDIR)/scripts/merge-maps.sh > $(COMBINED_MAP)
$(O_TO_S_DO)
else
$(LIB_ONE): FORCE
--- /dev/null
+#!/bin/sh
+
+FILES=$(find "$RTE_SDK"/lib "$RTE_SDK"/drivers -name "*_version.map")
+SYMBOLS=$(grep -h "{" $FILES | sort -u | sed 's/{//')
+
+first=0
+prev_sym="none"
+
+for s in $SYMBOLS; do
+ echo "$s {"
+ echo " global:"
+ echo ""
+ for f in $FILES; do
+ sed -n "/$s {/,/}/p" "$f" | sed '/^$/d' | grep -v global | grep -v local | sed -e '1d' -e '$d'
+ done | sort -u
+ echo ""
+ if [ $first -eq 0 ]; then
+ first=1;
+ echo " local: *;";
+ fi
+ if [ "$prev_sym" = "none" ]; then
+ echo "};";
+ prev_sym=$s;
+ else
+ echo "} $prev_sym;";
+ prev_sym=$s;
+ fi
+ echo ""
+done