This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Use LD_SO in gnu/libnames.h



Currently we use different names for the dynamic linker in
<gnu/lib-names.h>.  On same platforms we have:
#define LD_LINUX_SO     "ld-linux.so.2"

on others:
#define LD_SO   "ld.so.1"

and ia64 is also different :-(

I'm appending a patch by Andreas Schwab to always use LD_SO.  If we
use this patch, we also have to change elf/readlib.c to use LD_SO.
Currently readlib.c uses LD_LINUX_SO and this way compilation of glibc
fails on e.g. powerpc and ia64.

Using LD_SO we're incompatible to former versions - but it's IMO an
advantage since now all platforms use the same name for the dynamic
linker.

May I commit the patch to glibc 2.2?

Andreas

2000-05-26  Andreas Schwab  <schwab@suse.de>

	* Makeconfig ($(common-objpfx)soversions.mk): Prepend `$lib=' to
	entries in all-sonames.
	($(common-objpfx)gnu/lib-names.h): Use it for the CPP symbol.

Index: Makeconfig
===================================================================
RCS file: /cvs/glibc/libc/Makeconfig,v
retrieving revision 1.236
diff -u -a -u -r1.236 Makeconfig
--- Makeconfig	2000/04/28 05:07:08	1.236
+++ Makeconfig	2000/05/26 12:26:43
@@ -709,9 +709,9 @@
 	while read lib number setname; do \
 	  case $$number in \
 	    [0-9]*) echo "$$lib.so-version=.$$number"; \
-		    echo "all-sonames+=$$lib.so\$$($$lib.so-version)";;\
+		    echo "all-sonames+=$$lib=$$lib.so\$$($$lib.so-version)";;\
 	    *)	    echo "$$lib.so-version=$$number"; \
-		    echo "all-sonames+=\$$($$lib.so-version)";;\
+		    echo "all-sonames+=$$lib=\$$($$lib.so-version)";;\
 	  esac; \
 	done < $< > $@T; exit 0
 	mv -f $@T $@
@@ -735,10 +735,11 @@
 	 echo; \
 	 (libs='$(all-sonames)';\
 	  for l in $$libs; do \
-	    upname=`echo $$l | sed 's/[.]so.*//' | \
+	    name=`echo $$l | sed 's/.*=//'`; \
+	    upname=`echo $$l | sed 's/=.*//' | \
 		    tr 'abcdefghijklmnopqrstuvwxyz-' \
 		       'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`; \
-	    echo "#define	$${upname}_SO	\"$$l\""; \
+	    echo "#define	$${upname}_SO	\"$$name\""; \
 	  done;) | sort; \
 	 echo; \
 	 echo '#endif	/* gnu/lib-names.h */';) > ${@:stmp=T}

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]