home *** CD-ROM | disk | FTP | other *** search
- From: mjs@hpfcso.FC.HP.COM (Marc Sabatella)
- Date: Fri, 28 Aug 1992 17:24:16 GMT
- Subject: Re: that HPUX ld linker again...
- Message-ID: <7371272@hpfcso.FC.HP.COM>
- Organization: Hewlett-Packard, Fort Collins, CO, USA
- Path: sparky!uunet!pmafire!news.dell.com!natinst.com!cs.utexas.edu!usc!sdd.hp.com!hpscdc!cupnews0.cup.hp.com!hppad.waterloo.hp.com!hppad!hpfcso!mjs
- Newsgroups: comp.sys.hp
- References: <3280@tivoli.UUCP>
- Lines: 38
-
- In comp.sys.hp, stuart@TIVOLI.COM (Stuart Jarriel) writes:
-
- > ld: R_DATA_ONE_SYMBOL fixup in file ds_common.o for code unsat symbol "stupid_test" - use P' fixup
-
- If the .o file is created from assembly language, then you need to check out
- the "Programming On HP-UX" manual to see how to correctly PIC-ize the code.
-
- If the .o file came from am HP compiler, this may indicate you didn't use the
- "+z" or "+Z" option to enable PIC, although the error message in that case is
- normally slightly different. If you did use "+z" or "+Z", then this may be a
- bug in the compiler, or perhaps the linker. I don't work directly on the
- 700/800 compilers or linker, so I don't know if there are any known problems of
- this nature.
-
- One other way I know to generate this error is to somehow force debugging
- information into an object file that is otherwise PIC. Normally, the compiler
- drivers disable "-g" when generating PIC, but it is possible to override this
- using "-Wx" options. Also, if an object file is not explicitly compiled PIC,
- but happens to contain no absolute address references in its text segment, the
- linker will often accept it when building a shared library. It is conceivable
- such an object file might have debugging information and would generate this
- error. Turn off the "-g" when compiling, and add "+z" or "+Z" to be safe. If
- for some reason this cannot be done, adding "-G" to the linker command line
- will cause it to ignore debugging information, which is fine, because the
- debugger wouldn't have looked at it anyhow. If spurious debugging information
- is your problem, "-G" will make it go away - although you really should find
- out how the debugging information got there, and generate the object file in
- the supported way - with "+z" or "+Z" and no "-g" - if at all possible.
-
- Note - I think "CC" (C++ compiler) claims it disables "-g" when generating PIC,
- but actually doesn't - that may be how you got debugging information in there,
- if that is in fact what happened.
-
- --------------
- Marc Sabatella (marc@hpmonk.fc.hp.com)
- Disclaimers:
- 2 + 2 = 3, for suitably small values of 2
- Bill (H.) and Dave (P.) may not always agree with me
-