Library Maintenance

How are libraries created and maintained? I tried the following to add prog.o to an existing library

ar -r library.so prog.o

but the output is "File format not recognized", on the other hand

nm --print-armap library.so 

does print a table of contents.

A shared library is not an archive (file.a) so it cannot contain symbol references that are found in object code (file.o) It contains PIC (position independent code) references - meaning the entry points in a .so (file.so or file.sl) can be linked at runtime into a block of code with any offset (address)

You are mixing apples and oranges. In order to do what you wanted, the module has to be compiled as PIC. See the man/info page for gcc.

PS your lat/long resolves to the middle of farmland You work from home I guess.

Thanks, I found a good howto at

Program Library HOWTO

Yep, it's a 2 hour drive to Toronto, a trip I make usually once a week.