Many files:
  Checked in e2fsprogs 1.01.

diff --git a/lib/Makefile.elf-lib b/lib/Makefile.elf-lib
index 10051dd..bd2693c 100644
--- a/lib/Makefile.elf-lib
+++ b/lib/Makefile.elf-lib
@@ -5,6 +5,7 @@
 # In order to use this stub, the following makefile variables must be defined.
 # 
 # ELF_VERSION = 1.0
+# ELF_SONAME = 1
 # ELF_IMAGE = libce
 # ELF_MYDIR = et
 # ELF_INSTALL_DIR = $(SHLIBDIR)
@@ -18,15 +19,17 @@
 	mkdir elfshared
 
 ELF_LIB = $(ELF_IMAGE).so.$(ELF_VERSION)
+ELF_SONAME = $(ELF_IMAGE).so.$(ELF_SO_VERSION)
 
 image:		$(ELF_LIB)
 
 $(ELF_LIB): $(OBJS)
-	(cd elfshared; $(CC) --shared -o $(ELF_LIB) $(OBJS))
+	(cd elfshared; $(CC) --shared -o $(ELF_LIB) -Wl,-soname,$(ELF_SONAME) $(OBJS))
 	$(MV) elfshared/$(ELF_LIB) .
-	$(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so
+	$(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so ../$(ELF_SONAME)
 	$(LN) $(ELF_LIB) ../$(ELF_LIB)
 	$(LN) ../$(ELF_LIB) ../$(ELF_IMAGE).so
+	$(LN) ../$(ELF_LIB) ../$(ELF_SONAME)
 
 installdirs::
 	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(ELF_INSTALL_DIR)