Subject: Binding libs...

From: [email-masked] (J.Plewe)
Date: Wed, 22 Jun 94 11:00:10 +0200

Hello!

Last night I was playing around with some of the postgres demos
in order to find out some things which are very interesting 
for me.

Starting with circle.c I added further (graphical) functionality
to the output routine.
This made it necessary to link circle.o with a graphical lib.

And this is the point where I failed.

Using the load-command postgres either complains too few symbols,
when I have not linked circle.o with my lib;
or it complains about multiple defined symbols.

The problem I think is that some libs use symbols already used 
with postgres; in my case e.g. 'circf' and others.

So, do you think there is a possibility to use an arbitrary lib
together with postgres?
Is the a possibility e.g. to link circle.o in a way, that internal 
references are covered but only important symbols (circle_out) show
in the symboltable (some kind of a soft strip)?

I tried these things with postgres 4.2 on a linux system, but the
will arise anywhere, I think.

Thanks for any help,

- Joerg

*********************************************************************
Dipl. Phys. Joerg Plewe               [email-masked]
MPI fuer molekulare Physiologie
Rheinlanddamm 201
44139 Dortmund
Germany                               +49 (0)231 1206 384
*********************************************************************

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "[email-masked]"

   If this fails, send mail to "[email-masked]" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================

---

From: [email-masked] (Kai Petzke)
Date: Thu, 23 Jun 1994 12:55:11 +0200 (MET DST)

> with postgres; in my case e.g. 'circf' and others.

[...]

There is no easy answer to your question.  A few possibilities:

- If only a few symbols are in your way, write sed scripts, which
  replace them with something different.  Eg.:

	s/\(^|[^a-zA-Z_0-9]\)circf\($|[^a-zA-Z_0-9]\)/PG_&/g

  and apply them to all affected files of the source tree.

- Get the "binutils" source code (from the GCC/src directory 
  of almost any linux ftp server) and hack the "strip" command
  so it allows to specify a set of symbol names, which should
  not be stripped.

Kai