- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Stripping debug symbols from the executables and t...
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
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
07-04-2020 09:37 PM - edited 07-05-2020 05:00 AM
07-04-2020 09:37 PM - edited 07-05-2020 05:00 AM
Stripping debug symbols from the executables and the shared libraries
Hi,
I'm building Postgres (C/C++ builds) on HP-UX B.11.31 (IA64) with aCC compiler using "-g" flag. My goal is to strip the symbols and store it in a seperate files so that they can be used to debug a coredump.
On Linux, I use the objcopy and strip commands for the executable and the shared libraries as below;
$OBJCOPY --only-keep-debug "${tostripfile}" "${STAGING_DIR}/symbols/${tostripfile}.symbols"
$STRIP --strip-debug --strip-unneeded "${tostripfile}"
$OBJCOPY --add-gnu-debuglink="${STAGING_DIR}/symbols/${tostripfile}.symbols" "${tostripfile}"
where {tostripfile} points to an executable or a shared library. How do I do it on HP-UX?
Also, on RHEL the file command generally mentioned if the executable is stripped or non-stripped. But that doesn't seem to be the case on HP-UX so how can I find out if the executable if stripped or not?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2020 12:20 AM
07-12-2020 12:20 AM
Re: Stripping debug symbols from the executables and the shared libraries
when compiling with -g the .o file contains the debug info.
hpux by default puts the debug info into the .o
but the -s or strip command removes all info from the target file.
if the goal is to remove the debug info from the binary, its already done.