Browse Source

Fix up naming of ld.so so every uses the same define. The top level
was using one name and the ld.so-1 dir was using another (they happened
to be the same). Fix that.
-Erik

Eric Andersen 23 years ago
parent
commit
be0f7c05d8
9 changed files with 20 additions and 21 deletions
  1. 0 2
      Makefile
  2. 1 1
      Rules.mak
  3. 1 1
      extra/gcc-uClibc/Makefile
  4. 4 4
      ldso/Makefile
  5. 3 3
      ldso/README
  6. 0 2
      ldso/Rules.mak
  7. 2 2
      ldso/ldso/.cvsignore
  8. 8 5
      ldso/ldso/Makefile
  9. 1 1
      ldso/libdl/Makefile

+ 0 - 2
Makefile

@@ -57,7 +57,6 @@ shared: $(LIBNAME)
 	fi
 	fi
 	@rm -rf tmp
 	@rm -rf tmp
 	ln -sf $(SHARED_FULLNAME) $(SHARED_MAJORNAME)
 	ln -sf $(SHARED_FULLNAME) $(SHARED_MAJORNAME)
-	ln -sf $(SHARED_MAJORNAME) libc.so
 	@$(MAKE) -C crypt shared
 	@$(MAKE) -C crypt shared
 	@$(MAKE) -C libutil shared
 	@$(MAKE) -C libutil shared
 	@$(MAKE) -C libm shared
 	@$(MAKE) -C libm shared
@@ -125,7 +124,6 @@ ifneq ($(DO_SHARED),)
 	rm -rf $(INSTALL_DIR)/lib/libc.so
 	rm -rf $(INSTALL_DIR)/lib/libc.so
 	install -m 755 $(SHARED_FULLNAME) $(INSTALL_DIR)/lib/
 	install -m 755 $(SHARED_FULLNAME) $(INSTALL_DIR)/lib/
 	(cd $(INSTALL_DIR)/lib;ln -sf $(SHARED_FULLNAME) $(SHARED_MAJORNAME))
 	(cd $(INSTALL_DIR)/lib;ln -sf $(SHARED_FULLNAME) $(SHARED_MAJORNAME))
-	(cd $(INSTALL_DIR)/lib;ln -sf $(SHARED_MAJORNAME) libc.so)
 # ldconfig is really not necessary, and impossible to cross
 # ldconfig is really not necessary, and impossible to cross
 #ifeq ($(INSTALL_DIR),)
 #ifeq ($(INSTALL_DIR),)
 #	/sbin/ldconfig -n $(INSTALL_DIR)/lib
 #	/sbin/ldconfig -n $(INSTALL_DIR)/lib

+ 1 - 1
Rules.mak

@@ -30,7 +30,7 @@ MINOR_VERSION=9.5
 LIBNAME=libc.a
 LIBNAME=libc.a
 SHARED_FULLNAME=uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so
 SHARED_FULLNAME=uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so
 SHARED_MAJORNAME=libc.so.$(MAJOR_VERSION)
 SHARED_MAJORNAME=libc.so.$(MAJOR_VERSION)
-UCLIBC_LDSO=ld-linux-uclibc.so.$(MAJOR_VERSION)
+UCLIBC_LDSO=ld-uclibc.so.$(MAJOR_VERSION)
 
 
 BUILDTIME = $(shell TZ=UTC date --utc "+%Y.%m.%d-%H:%M%z")
 BUILDTIME = $(shell TZ=UTC date --utc "+%Y.%m.%d-%H:%M%z")
 
 

+ 1 - 1
extra/gcc-uClibc/Makefile

@@ -3,7 +3,7 @@ include $(TOPDIR)Rules.mak
 
 
 # NOTE: This may need to be modified for your system
 # NOTE: This may need to be modified for your system
 ifeq ($(LDSO_PRESENT), $(TARGET_ARCH))
 ifeq ($(LDSO_PRESENT), $(TARGET_ARCH))
-	DYNAMIC_LINKER = $(INSTALL_DIR)/lib/$(UCLIBC_LDSO)
+	DYNAMIC_LINKER=$(INSTALL_DIR)/lib/$(UCLIBC_LDSO)
 else
 else
 	DYNAMIC_LINKER=$(SYSTEM_LDSO)
 	DYNAMIC_LINKER=$(SYSTEM_LDSO)
 endif
 endif

+ 4 - 4
ldso/Makefile

@@ -12,10 +12,10 @@ all:
 install: all
 install: all
 	if [ -d $(TOPDIR)ld.so-1/d-link/$(TARGET_ARCH) ] ; then \
 	if [ -d $(TOPDIR)ld.so-1/d-link/$(TARGET_ARCH) ] ; then \
 		install -d $(INSTALL_DIR)/lib $(INSTALL_DIR)/etc ; \
 		install -d $(INSTALL_DIR)/lib $(INSTALL_DIR)/etc ; \
-		install -m 755 $(TOPDIR)ld.so-1/d-link/$(DLINKER).$(LDSO_VMAJOR) $(INSTALL_DIR)/lib/ ; \
-		install -m 644 $(TOPDIR)ld.so-1/libdl/$(LIBDL).$(LDSO_VMAJOR) $(INSTALL_DIR)/lib/  ; \
-		(cd $(INSTALL_DIR)/lib/;ln -sf $(DLINKER).$(LDSO_VMAJOR) $(DLINKER))  ; \
-		(cd $(INSTALL_DIR)/lib/;ln -sf $(LIBDL).$(LDSO_VMAJOR) $(LIBDL))  ; \
+		install -m 755 $(TOPDIR)ld.so-1/d-link/$(UCLIBC_LDSO) $(INSTALL_DIR)/lib/ld-linux-uclibc.so ; \
+		install -m 644 $(TOPDIR)ld.so-1/libdl/$(LIBDL).$(MAJOR_VERSION) $(INSTALL_DIR)/lib/  ; \
+		(cd $(INSTALL_DIR)/lib/;ln -sf ld-linux-uclibc.so $(UCLIBC_LDSO)); \
+		(cd $(INSTALL_DIR)/lib/;ln -sf $(LIBDL).$(MAJOR_VERSION) $(LIBDL))  ; \
 	fi;
 	fi;
 
 
 ldso:
 ldso:

+ 3 - 3
ldso/README

@@ -5,17 +5,17 @@ Inital port for uClibc from debian ld.so_1.9.11-9.tar.gz.
 
 
 Removed a.out support.
 Removed a.out support.
 
 
-"make" generates the ld-linux-uclibc.so.1, libdl.so.1, ldd, ldconfig
+"make" generates the ld-uclibc.so.0, libdl.so.0, ldd, ldconfig
        suitable for the target platform.
        suitable for the target platform.
 
 
-"make DEVEL=true" generates the same files, but ld-linux-uclibc.so.1 and
+"make DEVEL=true" generates the same files, but ld-uclibc.so.0 and
        ldconfig are modified to not conflict with the devel platform system
        ldconfig are modified to not conflict with the devel platform system
        libs.  (This is only of use if TARGET_ARCH == NATIVE_ARCH.)  These
        libs.  (This is only of use if TARGET_ARCH == NATIVE_ARCH.)  These
        modified versions ignore /lib and /usr/lib and look for shared libs
        modified versions ignore /lib and /usr/lib and look for shared libs
        only in $(INSTALL_DIR)/lib.  The modified ldconfig writes ld.so.cache
        only in $(INSTALL_DIR)/lib.  The modified ldconfig writes ld.so.cache
        in $(INSTALL_DIR)/etc.
        in $(INSTALL_DIR)/etc.
 
 
-The above assumes you've set the DYNAMIC_LINKER to /lib/ld-linux-uclibc.so.1
+The above assumes you've set the DYNAMIC_LINKER to /lib/ld-uclibc.so.0
 in extra/gcc-uClibc/Makefile.
 in extra/gcc-uClibc/Makefile.
 
 
 Todo:
 Todo:

+ 0 - 2
ldso/Rules.mak

@@ -1,8 +1,6 @@
 include $(TOPDIR)Rules.mak
 include $(TOPDIR)Rules.mak
 
 
 LDSO_VERSION=1.9.11
 LDSO_VERSION=1.9.11
-LDSO_VMAJOR=$(MAJOR_VERSION)
-DLINKER = ld-linux-uclibc.so
 LIBDL = libdl.so
 LIBDL = libdl.so
 
 
 DEVEL=true
 DEVEL=true

+ 2 - 2
ldso/ldso/.cvsignore

@@ -1,2 +1,2 @@
-ld-linux-uclibc.so*
-
+ld-uclibc.so*
+ld.so.h

+ 8 - 5
ldso/ldso/Makefile

@@ -11,19 +11,22 @@ OBJS=$(AOBJS) $(COBJS)
 
 
 ELF_LDFLAGS=--shared # using GNU ld
 ELF_LDFLAGS=--shared # using GNU ld
 
 
-all: lib
+all: ld.so.h lib
+
+ld.so.h:
+	echo "char *_dl_progname = \""$(UCLIBC_LDSO)"\";" > ld.so.h
 
 
 lib:: $(OBJS) $(DLINK_OBJS)
 lib:: $(OBJS) $(DLINK_OBJS)
-	$(LD) -e _dl_boot $(ELF_LDFLAGS) -o $(DLINKER).$(LDSO_VMAJOR) \
-	  -soname $(DLINKER).$(LDSO_VMAJOR) $(OBJS)
+	$(LD) -e _dl_boot $(ELF_LDFLAGS) -o $(UCLIBC_LDSO) \
+		-soname $(UCLIBC_LDSO) $(OBJS)
 
 
 $(COBJS): %.o : %.c
 $(COBJS): %.o : %.c
 	$(CC) -I. -I./$(TARGET_ARCH) -I../libdl $(CFLAGS) -c $< -o $@
 	$(CC) -I. -I./$(TARGET_ARCH) -I../libdl $(CFLAGS) -c $< -o $@
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 
 realclean::
 realclean::
-	$(RM) -f .depend $(DLINKER) core *.o *.a *.s *.i tmp_make foo *~
+	$(RM) -f .depend $(UCLIBC_LDSO)* core *.o *.a *.s *.i tmp_make foo *~
 
 
 clean::
 clean::
-	$(RM) -f $(DLINKER)* $(OBJS) core *.o *.a *.s *.i tmp_make foo *~
+	$(RM) -f $(UCLIBC_LDSO)* $(OBJS) core *.o *.a *.s *.i tmp_make foo *~
 
 

+ 1 - 1
ldso/libdl/Makefile

@@ -19,7 +19,7 @@ ELF_LDFLAGS=--shared -nostartfiles -nostdlib # using GNU ld
 
 
 lib:: $(OBJS)
 lib:: $(OBJS)
 	$(CC) $(ELF_LDFLAGS) \
 	$(CC) $(ELF_LDFLAGS) \
-		-o $(LIBDL).$(LDSO_VMAJOR) -Wl,-soname -Wl,$(LIBDL).$(LDSO_VMAJOR) \
+		-o $(LIBDL).$(MAJOR_VERSION) -Wl,-soname -Wl,$(LIBDL).$(MAJOR_VERSION) \
 		*.o $(TOPDIR)$(SHARED_FULLNAME)
 		*.o $(TOPDIR)$(SHARED_FULLNAME)
 
 
 obj: $(OBJS)
 obj: $(OBJS)