Penguin
Diff: SharedLibrary
EditPageHistoryDiffInfoLikePages

Differences between version 5 and predecessor to the previous major change of SharedLibrary.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 5 Last edited on Wednesday, June 2, 2004 10:27:35 am by JohnMcPherson Revert
Older page: version 3 Last edited on Tuesday, June 1, 2004 9:31:52 am by DanielLawson Revert
@@ -44,9 +44,11 @@
 For more information, see Ulrich Drepper's [How to write shared libraries | http://people.redhat.com/drepper/dsohowto.pdf]. 
  
 !! Creating a SharedLibrary using libtool(1) 
  
-libtool(1) is a package designed to assist with the creation of shared libraries. See the libtool(1) node for more information (eventually) about this program. 
+libtool(1) is a package designed to assist with the creation of shared libraries. See the libtool(1) node for more information (eventually) about this program  
+  
+One of the advantages of libtool is that it will use the correct linker options on different platforms, instead of you having to learn them all and putting them in your Makefile/configure script. (For example Linux/gcc uses -shared, -fPIC, -soname for certain options, Solaris uses -G, -KPIC, and -h respectively for those same options)
  
 If you have a .c file you wish to include in a library with libtool, you need to make a .lo file for it: 
  
  libtool --mode=compile gcc -c trace.c -o libtrace.lo 
@@ -68,4 +70,10 @@
 As a final step, I make sure to install my header files somewhere useful! 
  cp ../include/libtrace.h /usr/local/wand/include/libtrace.h 
  
 There are excellent docs on using libtool supplied with the program. 
+  
+!! Examining symbols in a shared library  
+ nm /lib/libc.so.6  
+doesn't work, as libc is a dynamic library, however  
+ nm --dynamic /lib/libc.so.6  
+will. just [FYI].