From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin v. Loewis" To: Thomas.Mehlhart@Regent.E-Technik.TU-Muenchen.DE Cc: gnu@gnu.org, thm@Regent.E-Technik.TU-Muenchen.DE, help-gcc@gnu.org Subject: Re: gnu-binutil/ld: Is it possible to make global objects in a library local Date: Thu, 09 Mar 2000 16:43:00 -0000 Message-id: <200003100036.BAA10357@loewis.home.cs.tu-berlin.de> References: <200003092153.QAA07750@delysid.gnu.org> X-SW-Source: 2000-03/msg00049.html > I have two libraries with containing a lot of objects with equal > names and I want to use both in different (loadable) modules of one > binary. (des from afs and ssl) Is there any posibility to build one > module with one library, another module with the other library, to > make the externally unused objects local and link all together to > one binary. I suppose you are creating shared libraries? Because for static ones, I doubt this is possible. > Does anyone know how to solve the problem on linux with gnu-binutils > > I I tried to use ld 2.9.1. Emulations: elf_i386 i386linux on linux with > a version script. > but nm says the resulting objects are global again. > On a sun with the sun linker (ld: Software Generation Utilities - > Solaris/ELF (3.0)) > linking with -M VERSION_SCRIPT makes the variables local. > Am I using version script in the wrong way on linux ??? I think the local symbols in a version script are a GNU extension; please read the binutils info pages for details. Martin From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin v. Loewis" To: Thomas.Mehlhart@Regent.E-Technik.TU-Muenchen.DE Cc: gnu@gnu.org, thm@Regent.E-Technik.TU-Muenchen.DE, help-gcc@gnu.org Subject: Re: gnu-binutil/ld: Is it possible to make global objects in a library local Date: Sat, 01 Apr 2000 00:00:00 -0000 Message-ID: <200003100036.BAA10357@loewis.home.cs.tu-berlin.de> References: <200003092153.QAA07750@delysid.gnu.org> X-SW-Source: 2000-q1/msg00359.html Message-ID: <20000401000000.gzm0lg9gqKB7MxbgitupqCNTU64TJ5cERLiLmZ_4RUc@z> > I have two libraries with containing a lot of objects with equal > names and I want to use both in different (loadable) modules of one > binary. (des from afs and ssl) Is there any posibility to build one > module with one library, another module with the other library, to > make the externally unused objects local and link all together to > one binary. I suppose you are creating shared libraries? Because for static ones, I doubt this is possible. > Does anyone know how to solve the problem on linux with gnu-binutils > > I I tried to use ld 2.9.1. Emulations: elf_i386 i386linux on linux with > a version script. > but nm says the resulting objects are global again. > On a sun with the sun linker (ld: Software Generation Utilities - > Solaris/ELF (3.0)) > linking with -M VERSION_SCRIPT makes the variables local. > Am I using version script in the wrong way on linux ??? I think the local symbols in a version script are a GNU extension; please read the binutils info pages for details. Martin