same function name in multiple archives - bad idea?

Anton Shterenlikht mexas at bristol.ac.uk
Tue Feb 1 17:08:00 UTC 2011


Is it wrong to have functions with the same name
in multiple archives? E.g:

% ar -t /usr/local/lib/libslatec.a | grep fdump.o
fdump.o
% ar -t /usr/local/lib/libcmlib.a | grep fdump.o
fdump.o

Which "fdump" function will be used if I then link
against -larchive1.a -larchive2.a?

And is there an easy way to find functions belonging
in multiple archives?

Many thanks
Anton

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423


More information about the freebsd-questions mailing list