home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!ceylon!roger.gte.com!mbr0
- From: mbr0@roger.gte.com (Mark Rosenthal)
- Newsgroups: comp.unix.aix
- Subject: Program hangs when linked without shared libraries
- Message-ID: <5040@ceylon.gte.com>
- Date: 29 Dec 92 02:25:30 GMT
- Sender: news@ceylon.gte.com
- Organization: GTE Laboratories
- Lines: 26
-
-
- I am trying to debug a program which is crashing. When I ask dbx for
- a stack trace, the addresses shown for library routines do not make
- sense. I believe this is due to dbx not being able to decipher
- addresses in shared libraries. Therefore, I have tried to link with
- non-shared libraries. I followed the directions in the 'ld' man page,
- and used the following arguments (to 'cc' actually):
-
- cc -o <output_file> -bnso -bI:/lib/syscalls.exp ... <lots of .o files>
- <lots of -l arguments>
-
- This caused 'ld' to complain about an undefined symbol that it had never
- needed when linking with shared libraries. I added the argument
- '-liconv' to resolve this problem and 'ld' produced an executable for
- me.
-
- However when I tried to run the executable, it appeared to hang. It
- used 45 minutes of CPU time (as reported by 'ps') before I finally
- gave up and killed the process. The code contains a number of
- printf()s followed by fflush(stdout)s in its initialization routine.
- The messages never appeared on stdout, so it appears that the program
- did not even get as far as entering its initialization routine.
-
- Any ideas?
-
- mbr@gte.com
-