prelink should not mess with running executables

Bryn M. Reeves bmr at redhat.com
Tue Jul 17 11:53:17 UTC 2012


On 07/17/2012 12:42 PM, Sam Varshavchik wrote:
>  … which can be used to reset the  
> application, so that it knows that it's been updated.

Because that is a common need across many packages.

Apparently being notified of a prelink is not such a common need. Even
if such a thing did exist it could not protect you from any other
modifications to the binary if it was specific to prelinking so you
would still need to handle this case to avoid bugs in your program.

Maybe you would find more acceptance for a request asking for something
like this rather than demanding the removal of something that has been
used for many years and that has good evidence for the benefits it
claims to provide?

> If you tell me how an app can be notified that prelink is about to rewrite  
> it, then this would be a comparable situation. But it's not.

Inotify?

If you care about it in your app (and since nobody else appears to have
asked for it I'd argue that's a good sign that there is not yet any
justification for a general facility like this) perhaps you should look
at inotify and register a watch for your executable's inode so that you
can take appropriate actions?

This would also deal with modifications other than prelinking.

You could even make such a thing into a library that other developers
could use to solve the same problem. If there's widespread need for the
facility I'm sure you'd soon have plenty of users and a good
justification to get it included in distributions.

That's generally how things move forward in open source.

Regards,
Bryn.



More information about the devel mailing list