Operating System - HP-UX
1754926 Members
3155 Online
108827 Solutions
New Discussion юеВ

HP linker dumps core, how to troubleshoot?

 
Harri Pasanen_1
Advisor

HP linker dumps core, how to troubleshoot?

Despite installing PHSS_30970, I have a the linker dying with bus error when trying to link a large shared library. The object files are all produced by g++ 3.4.3, and the link happens through g++, which uses the underlying hp linker. (ld32).

How can I best troubleshoot this problem? The linker core file is not very helpful, at least no for gdb.

$ gdb /usr/ccs/lbin/ld32 core
GNU gdb 6.2
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "hppa2.0w-hp-hpux11.11"...(no debugging symbols found)...
Core was generated by `ld32'.
Program terminated with signal 10, Bus error.

warning: Couldn't read general-purpose registers from `.reg' section in core file.

Unable to find __dld_flags symbol in object file.


warning: Couldn't read general-purpose registers from `.reg' section in core file.

#0 0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x00000000 in ?? ()
Previous frame identical to this frame (corrupt stack?)
(gdb)

Any ideas?

-Harri
5 REPLIES 5
Noel Miranda
Frequent Advisor

Re: HP linker dumps core, how to troubleshoot?

You could try

strings core

Re: HP linker dumps core, how to troubleshoot?

Try using HP gdb available at www.hp.com/go/wdb to debug this linker.
A. Clay Stephenson
Acclaimed Contributor

Re: HP linker dumps core, how to troubleshoot?

You might try increasing maxdsiz and/or maxssiz.
If it ain't broke, I can fix that.
ranganath ramachandra
Esteemed Contributor

Re: HP linker dumps core, how to troubleshoot?

can you run "odump -verifyall" on all object files and check whether it reports anything wrong ? what happens if you use hpux compilers?
 
--
ranga
[i work for hpe]

Accept or Kudo

Harri Pasanen_1
Advisor

Re: HP linker dumps core, how to troubleshoot?

I coaxed the ld command line out of gcc and passed it to tusc: Last things before failure are

read(4, "f c _ M D 5 _ D i g e s t : : f ".., 304) .................................... = 304
Received signal 10, SIGBUS, in user mode, [SIG_DFL], partial siginfo
Siginfo: si_code: I_NONEXIST, faulting address: 0x530ff, si_errno: 0
PC: 0x1ee4f, instruction: 0x49370058
exit(10) [implicit] ................................................................... WIFSIGNALED(SIGBUS)|WCOREDUMP

My maxdsize and maxssize are:

maxdsiz 0XC0000000
maxssiz 0X800000

which I would think sufficient, but how to tell?

Btw. I have the same code compiling and linking ok on Solaris, Linux and Windows. Previous version was linking fine on HP-UX, the change has mainly been increased use of templates in C++ code, leading to a very big number of extremely long symbol names.

I guess I'll need to start looking into compiling all this in 64 bit mode, where the linker is GNU as well...