Unix Technical Forum

Re: tools to examine memory,runtime loader debugging

This is a discussion on Re: tools to examine memory,runtime loader debugging within the HP-UX Operating System forums, part of the Unix Operating Systems category; --> sunil (sunilsreenivas2001@yahoo.com) wrote: : This doesn't really provide information I need: symbol resolution, : relocation processing, file processing, etc ...


Go Back   Unix Technical Forum > Unix Operating Systems > HP-UX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 05:56 PM
Dennis Handly
 
Posts: n/a
Default Re: tools to examine memory,runtime loader debugging

sunil (sunilsreenivas2001@yahoo.com) wrote:
: This doesn't really provide information I need: symbol resolution,
: relocation processing, file processing, etc which are available on
: SUN. Is there are any other tool for this.

I don't think so. You might be able to use: ldd -y,symbol

: Actually these don't need to be explicitly turned on. Man page for
: dld.so says HP compilers generate PIC by default

Right. +z/+Z are ignored on IPF. Only -exec will turn off PIC.

: I observed that in this case, where g() is multiply defined and also
: called in both a.so and b.so, they get their own local definitions
: rather than same definition (depending on which library is loaded first).

Right. This is illegal according to ANSI, you can only have one definition.
So, the compilers have decided to go with performance. A symbol that is
defined in the same file as a reference always picks that local one.

This is documented in the Tru64 UNIX to HP-UX 11i Porting Guide:
5.1.8 Uninitialized Global Data
http://h30097.www3.hp.com/docs/porti...r-promoteunint

You can change this by moving the definitions to an isolated file or
use -Bextern=foo, or #pragma extern foo.

: This is also the case with function symbols. I tried to use
: +ee options for these symbols when linking a.so and b.so but in vain.

Linker options have no effect on compiler code generation. It is too
late to use +ee, or -B symbolic, etc.

: What is the best way to ensure that all function and data references
: go to same shared library.
: Sunil

Make sure they are unique and in only one lib? ;-)
You'll need to make sure you isolate definitions, or use -B or the pragma.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:00 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com