HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- disadvantages of using +Z instead of +z
Operating System - HP-UX
1832285
Members
3659
Online
110041
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
Forums
Discussions
Discussions
Discussions
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
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-22-2004 09:30 PM
02-22-2004 09:30 PM
Can someone please tell me if there is any disadvantege to using the +Z compiler/linker flag compared to +z. As the size of my product increases I am geeting more messages from the compiler telling me to compile with +Z. Is there any problem with compiling all my source with +Z rather than just the ones that cannot be compiled with +z?
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2004 10:50 PM
02-22-2004 10:50 PM
Re: disadvantages of using +Z instead of +z
Hi
From
http://docs.hp.com/hpux/onlinedocs/4311/ar0903/options.htm#option+z
+z Command Line Option Syntax
+z
Description:
Causes the compiler to generate position-independent code (PIC), necessary for building a shared library.
Use -b to create a shared library.
+z is similar to the +Z option. Use +z unless the linker generates an error message indicating that you should use +Z.
Thus use +z of preference
Steve Steel
From
http://docs.hp.com/hpux/onlinedocs/4311/ar0903/options.htm#option+z
+z Command Line Option Syntax
+z
Description:
Causes the compiler to generate position-independent code (PIC), necessary for building a shared library.
Use -b to create a shared library.
+z is similar to the +Z option. Use +z unless the linker generates an error message indicating that you should use +Z.
Thus use +z of preference
Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2004 10:57 PM
02-22-2004 10:57 PM
Re: disadvantages of using +Z instead of +z
+Z enables long offsets, where +z has limits IIRC. I mostly use +Z, which might cause small object size increases, but at least is safe in large/huge applications
I've never encountered problems with +Z
Enjoy, Have FUN! H.Merijn
I've never encountered problems with +Z
Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2004 05:22 AM
02-23-2004 05:22 AM
Solution
The +Z option produces one extra instruction for each sequence of code that references a global symbol or calls a globally visible function. That is a small penalty in size and performance.
The +Z option is required for shared libraries that reference more than 4096 globally visible symbols. You could try using -h symbol hiding or -Bsymbolic to reduce the number of symbols that your shared libraries pu t in the procedure and data lookup tables. That could improve code size and performance, since the code to call a local symbol is smaller and faster. Symbol hiding needs a little care. You should not hide symbols that the compiler has introduced to implement features like static variable initializers or virtual function tables.
The +Z option is required for shared libraries that reference more than 4096 globally visible symbols. You could try using -h symbol hiding or -Bsymbolic to reduce the number of symbols that your shared libraries pu t in the procedure and data lookup tables. That could improve code size and performance, since the code to call a local symbol is smaller and faster. Symbol hiding needs a little care. You should not hide symbols that the compiler has introduced to implement features like static variable initializers or virtual function tables.
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.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP