Skip to contentSkip to conversation

fio: fix dynamic engines soname definition

PATCH In review Yigal Korman 3 participants 3 messages Oct 5, 2020 – Nov 1, 2020 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fio: fix dynamic engines soname definition

The SONAME of the engines should not match the name of the dependent library. Otherwise it confuses the dynamic loader into thinking the dependency is already resolved.

Prefixing the name with fio make more sense here.

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index 5ed8a808..48788f24 100644
@@ -569,7 +569,7 @@ endif
 
 ifdef CONFIG_DYNAMIC_ENGINES
 engines/lib$(1).so: $$($(1)_OBJS)
-	$$(QUIET_LINK)$(CC) -shared -rdynamic -fPIC -Wl,-soname,lib$(1).so.1 $$($(1)_LIBS) -o $$@ $$<
+	$$(QUIET_LINK)$(CC) -shared -rdynamic -fPIC -Wl,-soname,fio-$(1).so.1 $$($(1)_LIBS) -o $$@ $$<
 endif
 
 clean: FORCE
Signature · 1 line
2.17.1
#1 lore raw

Did this one get overlooked? CC'ing Jens...

Quoted 26 lines · Yigal Korman

The SONAME of the engines should not match the name of the dependent library. Otherwise it confuses the dynamic loader into thinking the dependency is already resolved.

Prefixing the name with fio make more sense here.

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -2
index 5ed8a808..48788f24 100644
@@ -569,7 +569,7 @@ endif
 
 ifdef CONFIG_DYNAMIC_ENGINES
 engines/lib$(1).so: $$($(1)_OBJS)
-       $$(QUIET_LINK)$(CC) -shared -rdynamic -fPIC -Wl,-soname,lib$(1).so.1 $$($(1)_LIBS) -o $$@ $$<
+       $$(QUIET_LINK)$(CC) -shared -rdynamic -fPIC -Wl,-soname,fio-$(1).so.1 $$($(1)_LIBS) -o $$@ $$<
 endif
 
 clean: FORCE
--
Quoted 2 lines

2.17.1

--
Sitsofe | http://sucs.org/~sits/

#2 lore raw
Quoted 1 line · Sitsofe Wheeler

Did this one get overlooked? CC'ing Jens...

It did - applied now, thanks.

Signature · 1 line
Jens Axboe