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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. |