public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Dynamic loading of two libraries in linux
       [not found] <BANLkTime+wtHLJ4obu9=SYGG-W4igTtM4g@mail.gmail.com>
@ 2011-06-27 21:26 ` Not provided
  2011-06-27 21:37   ` Mike Frysinger
  0 siblings, 1 reply; 2+ messages in thread
From: Not provided @ 2011-06-27 21:26 UTC (permalink / raw)
  To: binutils

Hello,

I'm trying to improve access to mine server, but I'm a bit stuck with one
case and I need to say - have no clue how to proceed. So I decided to check
if there is a help out there in the internet.
My case is as it follows - I've a server linux process that dynamically
loads library with dlopen(). Server as such is just a communication
framework and library implements business logic. It is two step process to
make logic available to the outside world - first step is dlopen +
initialization, second step is setup of internal routing. The most important
here is that first step may take lots of time and second one is very quick.
Also service can be accessed only after second step.
Now, if there is a bug in the library I would like to fix it and make it
active without service outage. Which means that my process would be as it
follows:
Step1. load old-library
Step2. routing setup
..... service is available and at one point I find a the bug ....
Step3. load new-version of library with a bugfix (long process)
Step4. remove routing for old-library (quick)
Step5. setup routing for new-library (quick)
Step6. unload old-library
As steps 4 & 5 are very quick, I could do it between requests to the server.
I'm concerned about step 3 and relocation & resolution of symbols. In this
step I do dlopen second time on a new-library which is almost the same as
old-library (the same in a sens that it exports the same symbols). Can I be
sure that after step 6 all the code for my new library will be correctly
loaded and executed? I've already did some tests and haven't seen any
problem yet, but it doesn't mean that there is none.
Do you see any other potential problems (execpt maybe memory allocated
statically)?
If I would like to study this topic in more details - where should I start?


Kind regards,
Kris

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Dynamic loading of two libraries in linux
  2011-06-27 21:26 ` Dynamic loading of two libraries in linux Not provided
@ 2011-06-27 21:37   ` Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2011-06-27 21:37 UTC (permalink / raw)
  To: binutils; +Cc: Not provided

[-- Attachment #1: Type: Text/Plain, Size: 131 bytes --]

i dont think this is a binutils issue.  sounds like you should try posting to 
the libc-help@sourceware.org mailing list.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-27 21:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <BANLkTime+wtHLJ4obu9=SYGG-W4igTtM4g@mail.gmail.com>
2011-06-27 21:26 ` Dynamic loading of two libraries in linux Not provided
2011-06-27 21:37   ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).