- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Using chatr to achieve -Bprotected_def?
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
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
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
тАО08-20-2008 11:42 AM
тАО08-20-2008 11:42 AM
I want to add -Bprotected_def to linker options while building my app.
Is there anyway I can use chatr on already built library and achieve the same symbol resolution, instead of rebuilding the application?
Thanks,
krishna
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2008 08:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2008 01:47 AM
тАО08-25-2008 01:47 AM
Re: Using chatr to achieve -Bprotected_def?
But, can you please explain what is the impact of using -Bsymbolic - why it is considered dangerous.
Also, I would like to know what is the best solution for our problem.
Our app uses a 3rd party library. Our libraries link to libstd.so and the 3rd party library links to libstd_v2.so and our application crashed during initialization of the 3rd.p.l. By asking them, we had the 3rd.p.l relinked with -Bsymbolic and it works fine now.
Can you guys explain which is the best solution in this case?
If I do not have control over how other libraries are built, how can i ensure from my side that the application will work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2008 08:42 AM
тАО08-25-2008 08:42 AM
Re: Using chatr to achieve -Bprotected_def?
There are certain symbols that must be global in scope, type_info, etc. for proper operation.
Also, you don't get a performance boost as you get with -Bprotected_def.
>I would like to know what is the best solution for our problem.
As documented, the correct solution is to port your application to the IPF default, -AA. That way you'll work with all of the other ISVs that use the default.
>application crashed during initialization of the 3rd p.l.
This is unexpected.
>we had the 3rd p.l relinked with -Bsymbolic and it works fine now.
This shouldn't have fixed anything if the only issue was -AA vs -AP.
>how can I ensure from my side that the application will work?
You need to figure out the real cause why your application aborted. Not just throw a dangerous option like -Bsymbolic at it.
And of course, port it to -AA.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2008 03:57 PM
тАО08-25-2008 03:57 PM
Re: Using chatr to achieve -Bprotected_def?
I understand what you are saying, but I need to debug more and find the root cause.
(btw, we are currently changing to use -AA)
Thanks again for the help. I will get back incase I find something/need more information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2008 05:35 PM
тАО08-25-2008 05:35 PM
Re: Using chatr to achieve -Bprotected_def?
Basically if -Bsymbolic fixes it, it would mean you have two classes or variables with the same name but different contents/layouts.
I have a tool that will find these things.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2008 06:50 PM
тАО08-25-2008 06:50 PM
Re: Using chatr to achieve -Bprotected_def?
In our case, I think the conflict is between libstd and libstd_v2.
The crash has the following stack trace (and the problem was solved by using -Bsymbolic)
#8 0x40000000006883d0:0 in fatalSignalHandler ()
#9
#10 0xc0000000000ead20:0 in pthread_mutex_lock+0x400 ()
from /usr/lib/hpux64/libpthread.so.1
#11 0xc000000000357170:0 in __thread_mutex_lock+0xb0 ()
from /usr/lib/hpux64/libc.so.1
#12 0xc00000000161c530:0 in _HPMutexWrapper::lock(void*)+0x90 ()
from /usr/lib/hpux64/libstd_v2.so.1
#13 <<3rd party lib code>>
Lets say, I have 2 libraries (say, other than libstd) with objects of same name but different internals, how should I overcome this problem if I should not use -Bsymbolic?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2008 07:07 PM
тАО08-25-2008 07:07 PM
Re: Using chatr to achieve -Bprotected_def?
See show_remaining_imports_elf.sh attached.
You use the "-dup" option and specify your executable and any shlibs you dynamically load. The tool should figure out which you use but if not, just add them too.
>I think the conflict is between libstd and libstd_v2.
There are no conflicts there, since one is in namespace std.
>The crash has the following stack trace (and the problem was solved by using -Bsymbolic)
It shouldn't.
#9
#10 0xc0000000000ead20:0 in pthread_mutex_lock+0x400
libpthread.so.1
#11 0xc000000000357170:0 in __thread_mutex_lock libc.so.1
#12 0xc00000000161c530:0 in _HPMutexWrapper::lock libstd_v2.so.1
#13 <<3rd party lib code>>
Typically this occurs because that lib or some other lib wasn't compiled with -mt and libpthread is linked into the application.
>I have 2 libraries with objects of same name but different internals, how should I overcome this problem if I should not use -Bsymbolic?
You do it according to the Standard, you use lawyers. You put one into a copyrighted namespace and sue anyone that uses your namespace.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2008 07:11 PM
тАО08-25-2008 07:11 PM
Re: Using chatr to achieve -Bprotected_def?
Thanks.