10-29-2009
Linkers and Loaders: how to (if possible) specify relative path for shared library to the loader
Hi,
first of all I apologize if this is not the right section to post this question, but I didn't
know where else to post it.
I've developed an application which uses a shared library developed by me.
Basically I want to give both the application and the shared library without the source,
and avoiding any installation process.
What I'd like to achieve is to provide a zip packet, which when unpacked, without doing
anything else, can run the application right away.
My problem is how to tell the loader to look for the shared library used in a relative path (perhaps the same of the application (working directory).
Usually you have to tell the loader which directory to look for for the library you want to use, by listing the directory in its .conf file (ld.so.conf), but I want to avoid this.
Is this possible to do? If so, how?
The working environment is of course Linux.
Any hint would be appreciated.
Regards,
S.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have a file with about 60 lines of path:
app-defaults/boxXYZ.......
I want to change this to /my/path/goes/here/app-defaults/boxXYZ, but of course vi doesn't like the regualr :s/old/new/ command.
Is there any other quick way to do this?
Thanks ;) (2 Replies)
Discussion started by: Yinzer955i
2 Replies
2. Shell Programming and Scripting
given a relative path, how do i convert it into a full one. i.e. if i am in
/home/polypus
and i am given foo/bar then to get a full path i can just concatinate it with pwd, but what if i am given "../mama"
how do i programmatically convert:
/home/polypus and ../mama into ... (4 Replies)
Discussion started by: polypus
4 Replies
3. UNIX for Dummies Questions & Answers
I'm having problems accessing the Knoppix software on my current computer and the replacement CD I ordered hasn't arrived yet.
I have a guess at what the answer would be for this question but I am not sure as I cannot test it with the software.
I have to create a directory called class, and... (1 Reply)
Discussion started by: mzero
1 Replies
4. Shell Programming and Scripting
I have a script in which i want to print absolute path of the same script irrespective of path from where i run script.
I am using
test.sh:
echo "pwd : `pwd`"
echo "script name: $0"
echo "dirname: `dirname $0`"
when i run script from /my/test/dir/struct as ../test.sh the output i... (10 Replies)
Discussion started by: rss67
10 Replies
5. Shell Programming and Scripting
Hello,
I have a doubt:-
---------------------
Current script:-
################################################################################################
prefix=user@my-server:
find . -depth -type d -name .git -printf '%h\0' | while read -d "" path ; do (
cd "$path" || exit $?... (4 Replies)
Discussion started by: sahil_jammu
4 Replies
6. UNIX for Advanced & Expert Users
Hello,
Any inputs about this one?
/usr/lib/dld.sl: Can't find path for shared library: libintl.sl
/usr/lib/dld.sl: No such file or directory
: Core file for 32-bit PA-RISC application
: /tmp/usr/local/bin/git saved to /etc/core.git.
ABORT instruction (core dumped)
bash-4.0# echo... (3 Replies)
Discussion started by: SystemAddict
3 Replies
7. UNIX for Dummies Questions & Answers
Hello Everyone,
I want to convert
Relative Path - /home/stevin/data/APP_SERVICE/../datafile.txt
to
Absolute Path - /home/stevin/data/datafile.txt
Is there a built-in tool in Unix to do this or any good ideas as to how can I implement this.
-Steve (5 Replies)
Discussion started by: qwarentine
5 Replies
8. Shell Programming and Scripting
Hallo everyone,
I am running an SQL-Script over KShell-Script. Thus, in the KShell-Script there are these lines:
WORKPATH=$PWD/work
EXPORTDIR=export_meine_datei_bitte
EXPORTPATH=${WORKPATH}/${EXPORTDIR}
...
db2 connect to ${DBNAME} || die "can not open database connection"
db2... (9 Replies)
Discussion started by: ratnalein88
9 Replies
9. UNIX for Dummies Questions & Answers
I have a lab I am doing for a Linux Operating class. The question I am stumped on is
"For the following questions, only use the cp command to copy files.
You should currently be inside your lab07 directory. Create a subdirectory inside this directory called ones and copy (working ... (1 Reply)
Discussion started by: CodyMongrel
1 Replies
10. UNIX for Beginners Questions & Answers
Hello,
I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies
LEARN ABOUT HPUX
shlib_debug_enable
shlib_debug_enable(5) File Formats Manual shlib_debug_enable(5)
NAME
shlib_debug_enable - dynamically enable or disable online shared library debugging support
VALUES
Fail Safe
Default
semantics is disabled
Allowed values
DESCRIPTION
This tunable dynamically enables (1) or disables (0) the online shared library debugging feature. When this tunable is enabled, shared
libraries of a running (active) application can be debugged.
Who Is Expected to Change This Tunable?
System administrators and developers who want to change the default behavior of
Restrictions on Changing
Changes to this tunable take effect immediately. There is no need to reboot the system.
When Should the Tunable Be Turned On?
When there is a need to debug a shared library of a running (active) application, this tunable can be turned on.
When this feature/tunable is not enabled, debugging of shared libraries can be done at application start time through the command. See
chatr(1).
What Are the Side Effects of Turning the Tunable On?
If an application which is being debugged for shared libraries is not MPAS (Mostly Private Address Space) executable, then the application
will be converted to an MPAS executable type. After the conversion, all rules which apply to regular MPAS executable type does apply to
the converted application until the process exits. The rules apply even after being detached from the debugger.
When Should the Tunable Be Turned Off?
Administrators and/or developers who will not need the online debugging feature of shared libraries.
What Are the Side Effects of Turning the Tunable Off?
When this tunable is disabled, then online debugging of shared libraries will not be possible beyond the existing hardware break point
facility. With hardware break points, only a limited number of breakpoints can be set.
What Other Tunables Should Be Changed at the Same Time?
None.
WARNINGS
All HP-UX kernel tunable parameters are release specific. This parameter may be removed or have its meaning changed in future releases of
HP-UX.
Installation of optional kernel software, from HP or other vendors, may cause changes to tunable parameter values. After installation,
some tunable parameters may no longer be at the default or recommended values. For information about the effects of installation on tun-
able values, consult the documentation for the kernel software being installed. For information about optional kernel software that was
factory installed on your system, see at
AUTHOR
was developed by HP.
SEE ALSO
chatr(1).
HP Integrity Systems Only Tunable Kernel Parameters shlib_debug_enable(5)