[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GNU libtool 1.3.3 and -export-symbols-regex problem
From: |
Roger Leigh |
Subject: |
GNU libtool 1.3.3 and -export-symbols-regex problem |
Date: |
Mon, 5 Mar 2001 22:30:34 +0000 |
User-agent: |
Mutt/1.2.5i |
I am creating a library libgimpprint.so with libtool.
It is linked with a libtool static convenience library libprintut.la,
but I do not want any of the symbols in libprintut.la to be exported
in the resultant library.
To do this, I am using '-export-symbols-regex stp_' in libgimpprint_la_LDFLAGS.
All of the externally visible functions begin with 'stp_'. This seems to work
initially: a file '.libs/libgimpprint.exp' is created with just the functions
I want. However, functions from libprintut.la are still visible in the library.
(the functions I don't want exporting are things like xmalloc, xgetcwd etc.
that I don't want othe programs using accidentally).
Sorry to have wasted your time if this is just my stupidity ;)
I have the following in Makefile.am:
ibgimpprint_la_SOURCES = \
gimp-print-intl-internal.h \
gimp-print-internal.h \
print-lexmark.c \
print-canon.c \
print-dither.c \
print-escp2.c \
print-pcl.c \
print-ps.c \
print-util.c \
print-color.c \
print-weave.c \
print-version.c \
quickmatrix257.h \
ran.367.179.h \
ran.509.131.h
libgimpprint_la_LIBADD = ../../lib/libprintut.la -lm
# Uncommment to build an unversioned library (version in soname)
libgimpprint_la_LDFLAGS = -release $(VERSION) -rpath $(libdir)
-export-symbols-regex stp_
make outputs the following:
generating symbol list for `libgimpprint.la'
/usr/bin/nm -B print-lexmark.lo print-canon.lo print-dither.lo print-escp2.lo
print-pcl.lo print-ps.lo print-util.lo print-color.lo print-weave.lo
print-version.lo ../../lib/.libs/libprintut.al | sed -n -e 's/^.*[
]\([ABCDGISTW]\)[ ][ ]*\(\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p'
| sed 's/.* //' | sort | uniq > .libs/libgimpprint.exp
egrep -e "stp_" ".libs/libgimpprint.exp" > ".libs/libgimpprint.expT"
mv -f ".libs/libgimpprint.expT" ".libs/libgimpprint.exp"
gcc -shared print-lexmark.lo print-canon.lo print-dither.lo print-escp2.lo
print-pcl.lo print-ps.lo print-util.lo print-color.lo print-weave.lo
print-version.lo -Wl,--whole-archive ../../lib/.libs/libprintut.al
-Wl,--no-whole-archive -lm -lc -Wl,-soname -Wl,libgimpprint-4.1.5.so
-Wl,-retain-symbols-file -Wl,.libs/libgimpprint.exp -o
.libs/libgimpprint-4.1.5.so
(cd .libs && rm -f libgimpprint.so && ln -s libgimpprint-4.1.5.so
libgimpprint.so)
creating libgimpprint.la
(cd .libs && rm -f libgimpprint.la && ln -s ../libgimpprint.la libgimpprint.la)
nm --dynamic .libs/libgimpprint.so | grep xmalloc
000000000002b140 T xmalloc
Regards,
Roger
--
Roger Leigh ** Registration Number: 151826, http://counter.li.org **
Need Epson Stylus Utilities? http://gimp-print.sourceforge.net/
For GPG Public Key: finger address@hidden or see public keyservers.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- GNU libtool 1.3.3 and -export-symbols-regex problem,
Roger Leigh <=