mk: add DT_SONAME to shared libraries
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 4 Feb 2015 08:22:50 +0000 (10:22 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 4 Feb 2015 22:29:29 +0000 (23:29 +0100)
This is all-important now that the libraries are versioned: DT_SONAME
presence instructs the runtime dynamic linker to load the shared object
by the versioned name in DT_SONAME instead of the the unversioned symlink
name used during build.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
mk/rte.lib.mk

index 865a307..0d7482d 100644 (file)
@@ -79,7 +79,7 @@ O_TO_A_DO = @set -e; \
        $(O_TO_A) && \
        echo $(O_TO_A_CMD) > $(call exe2cmd,$(@))
 
-O_TO_S = $(LD) $(_CPU_LDFLAGS) -shared $(OBJS-y) -o $(LIB)
+O_TO_S = $(LD) $(_CPU_LDFLAGS) -shared $(OBJS-y) -Wl,-soname,$(LIB) -o $(LIB)
 O_TO_S_STR = $(subst ','\'',$(O_TO_S)) #'# fix syntax highlight
 O_TO_S_DISP = $(if $(V),"$(O_TO_S_STR)","  LD $(@)")
 O_TO_S_DO = @set -e; \