diff mbox

[dpdk-dev] mk: Add DT_SONAME to shared libraries

Message ID 12505651f6361349aca43b8c2e9e19f8b7901e57.1423038170.git.pmatilai@redhat.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Panu Matilainen Feb. 4, 2015, 8:22 a.m. UTC
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>
---
 mk/rte.lib.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Neil Horman Feb. 4, 2015, 11:43 a.m. UTC | #1
On Wed, Feb 04, 2015 at 10:22:50AM +0200, Panu Matilainen wrote:
> 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>
> ---
>  mk/rte.lib.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
> index 865a307..0d7482d 100644
> --- a/mk/rte.lib.mk
> +++ b/mk/rte.lib.mk
> @@ -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; \
> -- 
> 2.1.0
> 
> 

Acked-by: Neil Horman <nhorman@tuxdriver.com>
Thomas Monjalon Feb. 4, 2015, 10:33 p.m. UTC | #2
2015-02-04 06:43, Neil Horman:
> On Wed, Feb 04, 2015 at 10:22:50AM +0200, Panu Matilainen wrote:
> > 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>

> > -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)

> Acked-by: Neil Horman <nhorman@tuxdriver.com>

Applied, thanks.
diff mbox

Patch

diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index 865a307..0d7482d 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -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; \