tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Linker and inter-library dependencies



On May 21,  3:50pm, david%l8s.co.uk@localhost (David Laight) wrote:
-- Subject: Re: Linker and inter-library dependencies

| As might have been mentioned elsewhere, it is more informative to look at
| the output of 'objdump -p', in particular the RPATH and NEEDED entries of
| the program and libraries.

Very much so.

| > Yes, this is by design.
| 
| For some definition of the word 'design' at least :-)

Yes, I was being facetious.

| > java uses LD_LIBRARY_PATH for some reason to
| > resolve its dependencies (presumably so it can be installed in different
| > places). The interpreter re-execs itself and sets LD_LIBRARY_PATH.
| 
| It certainly isn't really what LD_LIBRARY_PATH should be used for
| (unless you are linux whuch uses it for the wrong things :-)

Yes, and a good side-effect of that 'design' is that you cannot make
java setuid or add capabilities to it :-)

| > This
| > is what $ORIGIN was invented for, but I guess since not everyone has it
| > nobody can use it.
| 
| Does $ORIGIN work within a shared library?
| 
| Could be build libjava.so with an RPATH of $ORIGIN/cleient ?

$ORIGIN/jre/lib/client but that would mean we need two binaries javaclient
and javaserver. Not the end of the world. Perhaps I should try this next time
I build the jdk.

christos


Home | Main Index | Thread Index | Old Index