[TriLUG] executable and non-executable libraries

James Olin Oden james.oden at gmail.com
Tue May 15 09:26:50 EDT 2007


On 5/15/07, Joseph Mack NA3T <jmack at wm7d.net> wrote:
> I'm building linux from scratch. In the build for
> ncurses-5.5 (section 6.18), post install instructions set
> the ncurses libraries (/usr/lib/*.5.5) executable (755), but
> make libncurses++w.a non-executable (644).
>
> I'd assumed all libraries should be 644. When do you make a
> library executable?
>
> When I actually execute these libraries from the command
> line I get a segv.
>
> The only executable library I know about is /lib/libc.so.6
> which when executed, will give you its specs and build info.
> How do you make libc.so.6 executable? It needs a main()? If
> it has a main(), how does libc.so.6 get linked to an
> executable with a real main()?
>
> google with linux, shared, library, executable,
> non-executable didn't find anything relevant.
>
Those are actually really good questions.  The other library that is
executable is ld, the runtime linker, btw.   I've never looked into to
this, and I certainly hadn't thought of the name space collision with
two mains.  So all I can say is good question, but what I'm going to
do is forward you question on to Jeff Johnson (the maintainer of one
the forks of rpm who happens know lots of esoteric stuff like that)
and see if he knows.

Let you know if I get a response...james



More information about the TriLUG mailing list