Subject: How about adding -x to the shared library build rule?
To: netbsd-current-users <current-users@sun-lamp.cs.berkeley.edu>
From: Thomas Eberhardt <thomas@mathematik.uni-Bremen.de>
List: current-users
Date: 03/05/1994 01:24:25
ld leaves a lot of local symbol information (things as "bt_open.so.LC1")
in the shared libraries that I think isn't needed anymore after the
shared library is built.  Since the PIC object files are already processed
with "-x" after compiling, how about also adding a "-x" to the shared
library build rule in bsd.lib.mk?  I.e.:

*** bsd.lib.mk-	Thu Feb 10 12:12:21 1994
--- bsd.lib.mk	Sat Mar  5 01:21:44 1994
***************
*** 109,115 ****
  lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: lib${LIB}_pic.a ${DPADD}
  	@echo building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\)
  	@rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
! 	$(LD) -Bshareable -Bforcearchive \
  	    -o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} lib${LIB}_pic.a ${LDADD}
  
  llib-l${LIB}.ln: ${SRCS}
--- 109,115 ----
  lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: lib${LIB}_pic.a ${DPADD}
  	@echo building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\)
  	@rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
! 	$(LD) -x -Bshareable -Bforcearchive \
  	    -o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} lib${LIB}_pic.a ${LDADD}
  
  llib-l${LIB}.ln: ${SRCS}

-- 
/  Thomas Eberhardt <thomas@mathematik.uni-Bremen.de>  \            Moo!  (__)
| Center for Complex Systems and Visualization (CeVis) |_________/--------(oo)
|     University of Bremen, FB 3, Bibliothekstr. 1     |        * |______||\/
\_o_ D-28359 Bremen, Germany, FAX: +49 421 218-4236 _o_/          ^^     ^^

------------------------------------------------------------------------------