home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / hp / 9819 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  2.5 KB

  1. From: mjs@hpfcso.FC.HP.COM (Marc Sabatella)
  2. Date: Fri, 28 Aug 1992 17:24:16 GMT
  3. Subject: Re: that HPUX ld linker again...
  4. Message-ID: <7371272@hpfcso.FC.HP.COM>
  5. Organization: Hewlett-Packard, Fort Collins, CO, USA
  6. 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
  7. Newsgroups: comp.sys.hp
  8. References: <3280@tivoli.UUCP>
  9. Lines: 38
  10.  
  11. In comp.sys.hp, stuart@TIVOLI.COM (Stuart Jarriel) writes:
  12.  
  13. > ld: R_DATA_ONE_SYMBOL fixup in file ds_common.o for code unsat symbol "stupid_test" - use P' fixup
  14.  
  15. If the .o file is created from assembly language, then you need to check out
  16. the "Programming On HP-UX" manual to see how to correctly PIC-ize the code.
  17.  
  18. If the .o file came from am HP compiler, this may indicate you didn't use the
  19. "+z" or "+Z" option to enable PIC, although the error message in that case is
  20. normally slightly different.  If you did use "+z" or "+Z", then this may be a
  21. bug in the compiler, or perhaps the linker.  I don't work directly on the
  22. 700/800 compilers or linker, so I don't know if there are any known problems of
  23. this nature.
  24.  
  25. One other way I know to generate this error is to somehow force debugging
  26. information into an object file that is otherwise PIC.  Normally, the compiler
  27. drivers disable "-g" when generating PIC, but it is possible to override this
  28. using "-Wx" options.  Also, if an object file is not explicitly compiled PIC,
  29. but happens to contain no absolute address references in its text segment, the
  30. linker will often accept it when building a shared library.  It is conceivable
  31. such an object file might have debugging information and would generate this
  32. error.  Turn off the "-g" when compiling, and add "+z" or "+Z" to be safe.  If
  33. for some reason this cannot be done, adding "-G" to the linker command line
  34. will cause it to ignore debugging information, which is fine, because the
  35. debugger wouldn't have looked at it anyhow.  If spurious debugging information
  36. is your problem, "-G" will make it go away - although you really should find
  37. out how the debugging information got there, and generate the object file in
  38. the supported way - with "+z" or "+Z" and no "-g" - if at all possible.
  39.  
  40. Note - I think "CC" (C++ compiler) claims it disables "-g" when generating PIC,
  41. but actually doesn't - that may be how you got debugging information in there,
  42. if that is in fact what happened.
  43.  
  44. --------------
  45. Marc Sabatella (marc@hpmonk.fc.hp.com)
  46. Disclaimers:
  47.     2 + 2 = 3, for suitably small values of 2
  48.     Bill (H.) and Dave (P.) may not always agree with me
  49.