- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to compile a binary to be stripped
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
Forums
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
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-13-2010 12:14 AM
07-13-2010 12:14 AM
How to compile a binary to be stripped
I want to build a binary with stripped,and
the cflag and ldflag is like this:
CC=cc
CFLAGS=-Ae +w1 +O1 +DAportable +ESlit -DHPUX11
LDFLAGS=-Wl,+nodefaultrpath
But it seems the bianry built with this flags
is not stripped,
root# file `pwd`/a.out
a.out: PA-RISC1.1 shared executable dynamically linked -not stripped
So how can i build the binary to be stripped?
Thanks in advance!
Kevin
- Tags:
- strip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2010 01:06 AM
07-13-2010 01:06 AM
Re: How to compile a binary to be stripped
LDFLAGS=-Wl,+nodefaultrpath -s
or
LDFLAGS=-Wl,+nodefaultrpath -Wl,-s
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2010 03:44 AM
07-13-2010 03:44 AM
Re: How to compile a binary to be stripped
I suppose it goes without saying, but after the fact, 'strip(1)' performs the same action on the binary as 'ld -s'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2010 03:36 PM
07-13-2010 03:36 PM
Re: How to compile a binary to be stripped
If you don't care about old PA1.1 systems, you can replace this by +DA2.0.
I don't see any "-s" option.
>Laurent: add -Wl,-s or -s in LDFLAGS
There is no need for -Wl, since -s is a full fledged driver option.
>JRF: I suppose it goes without saying, but after the fact, strip(1) performs the same action on the binary as "ld -s".
No, it doesn't, there are slight differences but not enough for ordinary mortals to care. :-)
But using strip(1) gives you more choices. I.e. you can keep the original around.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2010 09:43 PM
07-14-2010 09:43 PM
Re: How to compile a binary to be stripped
Got it! Thanks!