public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* gnu-binutil/ld: Is it possible to make global objects in a library local
@ 2000-03-09 13:54 Thomas Mehlhart
  2000-03-09 16:43 ` Martin v. Loewis
  2000-04-01  0:00 ` Thomas Mehlhart
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Mehlhart @ 2000-03-09 13:54 UTC (permalink / raw)
  To: gnu, thm

Hello

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.

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 ???
Does anyone have an example how to use it the right way ??

Best regards
Thomas




--

Thomas.Mehlhart@eda.ei.tum.de
Lehrstuhl fuer                     Institute of
Rechnergestuetztes Entwerfen       Electronic Design Automation
Technische Universitaet Muenchen   Technical University of Munich
Arcisstr. 21, 80333 Munich, Germany
Phone +49 89 289 23661                Fax +49 89 289 23696



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gnu-binutil/ld: Is it possible to make global objects in a library local
  2000-03-09 13:54 gnu-binutil/ld: Is it possible to make global objects in a library local Thomas Mehlhart
@ 2000-03-09 16:43 ` Martin v. Loewis
  2000-04-01  0:00   ` Martin v. Loewis
  2000-04-01  0:00 ` Thomas Mehlhart
  1 sibling, 1 reply; 4+ messages in thread
From: Martin v. Loewis @ 2000-03-09 16:43 UTC (permalink / raw)
  To: Thomas.Mehlhart; +Cc: gnu, thm, help-gcc

> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* gnu-binutil/ld: Is it possible to make global objects in a library local
  2000-03-09 13:54 gnu-binutil/ld: Is it possible to make global objects in a library local Thomas Mehlhart
  2000-03-09 16:43 ` Martin v. Loewis
@ 2000-04-01  0:00 ` Thomas Mehlhart
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Mehlhart @ 2000-04-01  0:00 UTC (permalink / raw)
  To: gnu, thm

Hello

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.

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 ???
Does anyone have an example how to use it the right way ??

Best regards
Thomas




--

Thomas.Mehlhart@eda.ei.tum.de
Lehrstuhl fuer                     Institute of
Rechnergestuetztes Entwerfen       Electronic Design Automation
Technische Universitaet Muenchen   Technical University of Munich
Arcisstr. 21, 80333 Munich, Germany
Phone +49 89 289 23661                Fax +49 89 289 23696



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gnu-binutil/ld: Is it possible to make global objects in a library local
  2000-03-09 16:43 ` Martin v. Loewis
@ 2000-04-01  0:00   ` Martin v. Loewis
  0 siblings, 0 replies; 4+ messages in thread
From: Martin v. Loewis @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Thomas.Mehlhart; +Cc: gnu, thm, help-gcc

> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-04-01  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-09 13:54 gnu-binutil/ld: Is it possible to make global objects in a library local Thomas Mehlhart
2000-03-09 16:43 ` Martin v. Loewis
2000-04-01  0:00   ` Martin v. Loewis
2000-04-01  0:00 ` Thomas Mehlhart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).