[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

8870.0. "Append object to shared library?" by TAV02::JEREMY () Tue Feb 18 1997 10:14

    
    Is there any way to *append* an object file to an existing shared library?
    I can't imagine that there isn't, but don't see an ld option to do it
    (ld -shared -o yourlib.so tst.o replaces yourlib.so with the new object).
    
    Thanks
T.RTitleUserPersonal
Name
DateLines
8870.1QUARRY::nethCraig NethTue Feb 18 1997 10:303
No, there is no way to do this.   A .so is NOT like an archive - it is
a resolved object, not much different from an executable.

8870.2Maybe you can use the incremental linking options?VAXCPU::michaudJeff Michaud - ObjectBrokerTue Feb 18 1997 10:590
8870.3TAV02::JEREMYThu Feb 20 1997 04:543
    Thanks for the replies. It looks like .1 is right, although it 
    seems terribly inconvenient for development environments with
    huge numbers of objects. 
8870.4QUARRY::nethCraig NethThu Feb 20 1997 08:4112
>It looks like .1 is right, 

Thanks.  Since I work on the linker, I have this wild idea that I ought
to know such things :-) 

> although it 
>    seems terribly inconvenient for development environments with
>    huge numbers of objects

What you're asking for is an incremental linker.   We'd like to do one, but
it would be a lot of effort, and to date, we haven't seen enough business
justification.   
8870.5Larger number of smaller .so's...DECC::SULLIVANJeff SullivanFri Feb 21 1997 15:1118
Re: .3
> seems terribly inconvenient for development environments with
> huge numbers of objects.

Maybe. But if that's the case, you probably want to break up your large archive
or shared object file into smaller pieces. Our project switched to using shared
object files for our development and debugging. We broke the big static archive
file into about 10 (logical) shared object files. This has worked great for us,
since the link times have significantly improved.

In the old world (one big static archive), incremental linking was high on our
wish list. With the new methodology, we don't really need an incremental linker.

We also build a debugging -non_shared executable, since we sometimes need to
copy it to another machine for debugging. When you need to do that, having to
copy all of the corresponding .so's can be a pain.

-Jeff