Copyright (C) 2000-2012 |
GNU Info (nasm.info)Section 8.2.68.2.6. Generating the Library File ---------------------------------- Having written some code modules and assembled them to `.o' files, you then generate your shared library with a command such as ld -shared -o library.so module1.o module2.o # for ELF ld -Bshareable -o library.so module1.o module2.o # for BSD For ELF, if your shared library is going to reside in system directories such as `/usr/lib' or `/lib', it is usually worth using the `-soname' flag to the linker, to store the final library file name, with a version number, into the library: ld -shared -soname library.so.1 -o library.so.1.2 *.o You would then copy `library.so.1.2' into the library directory, and create `library.so.1' as a symbolic link to it. automatically generated by info2www version 1.2.2.9 |