Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Gentoo: User

Why are *.so library files executable?

 

 

Gentoo user RSS feed   Index | Next | Previous | View Threaded


realnc at arcor

Jun 5, 2011, 7:43 AM

Post #1 of 3 (679 views)
Permalink
Why are *.so library files executable?

Gentoo users tend to be technically adept, so I'll ask the question here:

Why are *.so files set as executables? I noticed that they keep working
if I do a "chmod a-x" on them.


marduk at letterboxes

Jun 5, 2011, 8:08 AM

Post #2 of 3 (685 views)
Permalink
Re: Why are *.so library files executable? [In reply to]

On Sun, 2011-06-05 at 17:43 +0300, Nikos Chantziaras wrote:
> Gentoo users tend to be technically adept, so I'll ask the question here:
>
> Why are *.so files set as executables? I noticed that they keep working
> if I do a "chmod a-x" on them.

Well, they are "executables" in that they are object code that are
(loaded and) executed.

In the olden days (pre libc6?) believe it was required form them to be
both executable and by whoever wanted to run (load) them. It's probably
still a requirement for other *nix systems.


znxster at gmail

Jun 5, 2011, 8:13 AM

Post #3 of 3 (691 views)
Permalink
Re: Why are *.so library files executable? [In reply to]

On 5 June 2011 15:43, Nikos Chantziaras <realnc [at] arcor> wrote:
> Why are *.so files set as executables?  I noticed that they keep working if
> I do a "chmod a-x" on them.

You can in fact make a library be an executable at the same time, see:
/lib/libc.so.6

For those that care if can be accomplished by this method:
http://gcc.gnu.org/ml/gcc-help/2003-07/msg00232.html.

By rights shared libraries are a form of executable, the trick however
is that they have multiple entry points (whereas binaries have one).

I am not entirely sure the requirement for +x is needed anymore (it
certainly was in the past).

Thanks
Mark

Gentoo user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.