diff -Nuar a/js/src/build/Makefile.in b/js/src/build/Makefile.in
--- a/js/src/build/Makefile.in	2020-07-20 21:02:51.000000000 +0000
+++ b/js/src/build/Makefile.in	2020-08-28 15:16:55.659934940 +0000
@@ -78,6 +78,8 @@
 endif
 ifneq (,$(SHARED_LIBRARY))
 	$(SYSINSTALL) $(SHARED_LIBRARY) $(DESTDIR)$(libdir)
+	mv -f $(DESTDIR)$(libdir)/$(SHARED_LIBRARY) $(DESTDIR)$(libdir)/$(SHARED_LIBRARY).0
+	ln -s $(SHARED_LIBRARY).0 $(DESTDIR)$(libdir)/$(SHARED_LIBRARY)
 ifeq ($(OS_ARCH),Darwin)
 	install_name_tool -id $(abspath $(libdir)/$(SHARED_LIBRARY)) $(DESTDIR)$(libdir)/$(SHARED_LIBRARY)
 endif
diff -Nuar a/js/src/build/moz.build b/js/src/build/moz.build
--- a/js/src/build/moz.build	2020-07-20 21:02:51.000000000 +0000
+++ b/js/src/build/moz.build	2020-08-28 15:18:37.389927600 +0000
@@ -25,6 +25,7 @@
 if CONFIG['JS_SHARED_LIBRARY']:
     GeckoSharedLibrary('js', linkage=None)
     SHARED_LIBRARY_NAME = CONFIG['JS_LIBRARY_NAME']
+    LDFLAGS += ['-Wl,-soname,lib{}.so.0'.format(SHARED_LIBRARY_NAME)]
 
     # Ensure symbol versions of shared library on Linux do not conflict
     # with those in libxul.
