weak symbols [Re: Beowulf digest, Vol 1 #1482 - 2 msgs]

Joachim Worringen joachim at ccrl-nece.de
Tue Oct 7 05:17:36 EDT 2003


Wolfgang Dobler:
> On some machines libraries like MPICH contain all symbol names with both
> underscore conventions, i.e. `mpi_init__', and `mpi_init_' at the same
> time. Does anybody know whether there are easy ways of building such a
> library? Is there something like `symbol aliases' and how would one create
> these when generating the library?

Yes, most linkers support "weak symbols" in one way or another (there is no 
common way, usually a pragma or "function attributes" (gcc) are used) which 
supply all required API symbols for the one real implemented function. Just 
take a look at a source file like mpich/src/pt2pt/send.c to see how this can 
be done (some preprocessing "magic").

It can also be done w/o weak symbols at the cost of a slightly bigger library.

  Joachim

-- 
Joachim Worringen - NEC C&C research lab St.Augustin
fon +49-2241-9252.20 - fax .99 - http://www.ccrl-nece.de

_______________________________________________
Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf



More information about the Beowulf mailing list