- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: excessively large executables
Operating System - HP-UX
1754020
Members
8043
Online
108811
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО02-18-2004 06:30 AM
тАО02-18-2004 06:30 AM
excessively large executables
Hello,
I have a machine that has executables created by developers that are very large (>50meg and some libs >200 meg). I suspect that they are linking in some large libraries that may not be needed. Any tools available to investigate what is contained in a c++ exec, and whether libs linked in are in fact used?
Thanks...
I have a machine that has executables created by developers that are very large (>50meg and some libs >200 meg). I suspect that they are linking in some large libraries that may not be needed. Any tools available to investigate what is contained in a c++ exec, and whether libs linked in are in fact used?
Thanks...
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-18-2004 06:37 AM
тАО02-18-2004 06:37 AM
Re: excessively large executables
I'm willing to bet that these are statically linked executables. That can be good from the standpoint that the developer knows that they will run on any system but it does produce large, memory-wasteful executables.
Do a chatr filename. If you see no shared libraries listed then you are statically linked. Ldd can also be used. It will either report the shared libraries utilized or it will report ' "myfile" is not a shared executable' -- indicating that "myfile" is statically linked.
Man chatr, ldd for details.
Do a chatr filename. If you see no shared libraries listed then you are statically linked. Ldd can also be used. It will either report the shared libraries utilized or it will report ' "myfile" is not a shared executable' -- indicating that "myfile" is statically linked.
Man chatr, ldd for details.
If it ain't broke, I can fix that.
- Tags:
- chatr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2004 05:55 AM
тАО02-19-2004 05:55 AM
Re: excessively large executables
Use "ldd" or "chatr" to see what shared
libraries are in an executable. If the
library was an archive library, I don't
know of a tool that can get the library
name. But you can use "nm" to snoop around
to see what objects are in the executable.
However, I don't think the linker will link
in library code that's not used (either
archive or shared). One thing that can
bloat executables is having a lot of
initialized arrays:
double a[100000] = {0, 1, ...};
The compiler will make space in the
executable for the entire array.
Unitialized arrays (the same as above,
minus the = {0, 1, ...} part) are set up
at run time.
Use the "size -v" commmand to see how
much space is being used in an executable
for each type of data. In the "size -v"
output, $CODE is the program's executable
code, $BSS contains the unitialized arrays
and variables, and $DATA is the initialized
arrays and variables.
HTH
libraries are in an executable. If the
library was an archive library, I don't
know of a tool that can get the library
name. But you can use "nm" to snoop around
to see what objects are in the executable.
However, I don't think the linker will link
in library code that's not used (either
archive or shared). One thing that can
bloat executables is having a lot of
initialized arrays:
double a[100000] = {0, 1, ...};
The compiler will make space in the
executable for the entire array.
Unitialized arrays (the same as above,
minus the = {0, 1, ...} part) are set up
at run time.
Use the "size -v" commmand to see how
much space is being used in an executable
for each type of data. In the "size -v"
output, $CODE is the program's executable
code, $BSS contains the unitialized arrays
and variables, and $DATA is the initialized
arrays and variables.
HTH
- Tags:
- size
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP