- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to change or add the share dynamic library...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2019 05:56 AM
06-27-2019 05:56 AM
Here I want to directly use the custom libc.so.1 ...., but why the following way would be failed?
Notes: I have no way to recompile to change the share dynamic library without the source code!
#
#
#
# ldd ./sleep_st
./sleep_st:
libc.so.1 => /usr/lib/hpux32/libc.so.1
libdl.so.1 => /usr/lib/hpux32/libdl.so.1
#
#
#
# chatr ./sleep_st
./sleep_st:
32-bit ELF executable
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third Not Defined
shared library list:
libc.so.1
shared library binding:
deferred
global hash table disabled
global hash table size 1103
shared library mapped private disabled
runtime checks disabled
shared library segment merging disabled
shared library (dlopen) segment merging disabled
shared vtable support disabled
explicit unloading disabled
linkage table protection disabled
segments:
index type address flags size
8 text 04000000 z---c- D (default)
9 data 40010000 ---m-- D (default)
executable from stack: D (default)
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr dereferences trap disabled
address space model: default
caliper dynamic instrumentation disabled
#
#
#
# chatr +s enable -s -l /tmp/libc.so.1 ./sleep_st
chatr(error): invalid -l argument: /tmp/libc.so.1
#
#
#
# chatr +s enable -s +l /tmp/libc.so.1 ./sleep_st
chatr(error): invalid +l argument: /tmp/libc.so.1
#
#
#
Reference link:
https://www.unix.com/hp-ux/193579-how-use-chatr-change-static-library-path-binary.html
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2019 11:46 PM - edited 07-09-2019 11:50 PM
07-09-2019 11:46 PM - edited 07-09-2019 11:50 PM
SolutionLooks like the "-l" functionality is not really available. Anyway once you have enabled LD_LBRARY_PATH with "+s", you don't need the "-l" anymore.
[ hostname ~ ] $ cp /usr/bin/ls /tmp
[ hostname ~ ] $ cp /usr/lib/hpux32/libc.so.1 /tmp
[ hostname ~ ] $ LD_LIBRARY_PATH=/tmp ldd /tmp/ls
/tmp/ls:
libxcurses.so.1 => /usr/lib/hpux32/libxcurses.so.1
libc.so.1 => /usr/lib/hpux32/libc.so.1
libdl.so.1 => /usr/lib/hpux32/libdl.so.1
[ hostname ~ ] $ chmod 755 /tmp/ls
[ hostname ~ ] $ chatr -s +s enable /tmp/ls
[ hostname ~ ] $ LD_LIBRARY_PATH=/tmp ldd /tmp/ls
/tmp/ls:
libxcurses.so.1 => /usr/lib/hpux32/libxcurses.so.1
libc.so.1 => /tmp/libc.so.1
libdl.so.1 => /usr/lib/hpux32/libdl.so.1
--
ranga
[i work for hpe]