home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / windows / x / 15497 < prev    next >
Encoding:
Internet Message Format  |  1992-08-21  |  6.9 KB

  1. Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!bloom-beacon!INTERNET!dont-send-mail-to-path-lines
  2. From: dougbell@berlioz.nsc.COM (Doug Bell)
  3. Newsgroups: comp.windows.x
  4. Subject: Re: jump relocation out-of-range
  5. Message-ID: <9208210023.AA11802@berlioz.nsc.com>
  6. Date: 21 Aug 92 00:23:03 GMT
  7. Sender: daemon@athena.mit.edu (Mr Background)
  8. Organization: The Internet
  9. Lines: 159
  10.  
  11. *From sun!expo.lcs.mit.edu!xpert-mailer@nsc.nsc.com  Thu Aug 20 10:38:09 1992
  12. *Return-Path: <sun!expo.lcs.mit.edu!xpert-mailer@nsc.nsc.com>
  13. *Received: from nsc.nsc.com by berlioz.nsc.com (4.1/SMI-4.1)
  14. *    id AA03270; Thu, 20 Aug 92 10:38:09 PDT
  15. *Received: from sun by nsc.nsc.com (5.61/1.34) with UUCP
  16. *    id AA11332 for xstuff@berlioz.NSC.COM; Thu, 20 Aug 92 10:38:38 -0700
  17. *Received: from Sun.COM (sun-barr) by sun.Eng.Sun.COM (4.1/SMI-4.1)
  18. *    id AA21768; Thu, 20 Aug 92 07:35:35 PDT
  19. *Received: from expo.lcs.mit.edu by Sun.COM (4.1/SMI-4.1)
  20. *    id AA18018; Wed, 19 Aug 92 22:05:59 PDT
  21. *Received: by expo.lcs.mit.edu; Wed, 19 Aug 92 19:30:43 -0400
  22. *Received: from BLOOM-BEACON.MIT.EDU by expo.lcs.mit.edu; Wed, 19 Aug 92 19:30:34 -0400
  23. *Received:  by bloom-beacon.MIT.EDU (5.61/25-eef)id AA18511; Wed, 19 Aug 92 18:36:04 EDT
  24. *Received: from USENET by bloom-beacon.mit.edu with netnewsfor xpert@expo.lcs.mit.edu (xpert@expo.lcs.mit.edu)(contact usenet@bloom-beacon.mit.edu if you have questions
  25. *Date: 19 Aug 92 17:25:53 GMT
  26. *From: rogerk@Veritas.COM (Roger B.A. Klorese)
  27. *Organization: VERITAS Software
  28. *Subject: Re: jump relocation out-of-range
  29. *Message-Id: <1992Aug19.172553.27742@Veritas.COM>
  30. *Newsgroups: comp.windows.x
  31. *References: <1992Aug19.125703.7774@cid.aes.doe.CA>
  32. *Sender: xpert-request@expo.lcs.mit.edu
  33. *To: xpert@expo.lcs.mit.edu
  34. *Status: R
  35. *
  36. *In article <1992Aug19.125703.7774@cid.aes.doe.CA> afshwrh@cid.aes.doe.CA (Wayne Hodgins) writes:
  37. *>Hi
  38. *>
  39. *>When I attempt to compile & load the following code...
  40. *>
  41. *>#include <Xm/Xm.h>
  42. *>#include <X11/Intrinsic.h>
  43. *>#include <X11/StringDefs.h>
  44. *>#include <X11/Shell.h>
  45. *>.....
  46. *>    Widget toplevel;
  47. *>    XtAppContext app_context;
  48. *>.....
  49. *>        toplevel = XtAppInitialize(&app_context,"XText",NULL,
  50. *>                   0, &argc, argv, NULL, NULL, 0);
  51. *>.....
  52. *>
  53. *>I get this message from ld...
  54. *>
  55. *>/usr/lib/libX11.a(XlibInt.o): jump relocation out-of-range, bad object file prod
  56. *>uced, can't jump from 0x4d51e8 to 0x10048428 (syscall)
  57. *>
  58. *>The code loads fine as a standalone test program; the message occurs when
  59. *>I try to incorporate it into an existing larger program.
  60. *>Any ideas on what the problem may be?
  61. *
  62. *Yes.
  63. *
  64. *Somewhere, a symbol called "syscall" is being defined as a global data
  65. *variable; the loader is therefore attempting to place it at a data
  66. *address (0x10048428).  Somewhere else, such as in libc, a function called
  67. *"syscall" (a standard libc routine) is being called.  The linker can
  68. *resolve the symbol already, because of your data item, so it doesn't load in
  69. *the proper (function) "syscall."  But it can't jump to it, because the
  70. *difference in addresses is greater than that allowed for some jump types in
  71. *the (Mips?) architecture.
  72. *
  73. *Search your code for a variable called "syscall" and rename it.
  74. *
  75. *--
  76. *ROGER B.A. KLORESE                                             VERITAS Software
  77. *4800 Great America Parkway #420   Santa Clara, CA 95054    +1 408-727-1222 x310
  78. *rogerk@veritas.com                               {apple,pyramid}!veritas!rogerk
  79. *"Life turns on a dime." -- Ruth Ann
  80.  
  81. Hi,
  82. We had a time of it doing some porting, due to external symbols in a code
  83. overriding system interface symbols.  The loader(s) may/may not be
  84. helpful on this issue.  An (admittedly crude) but effective way to check 
  85. your .o files for the possibility of problems follows.  This method was 
  86. done on AIX machines. 
  87. Regards, Doug Bell  dougbell@berlioz.nsc.com  National Semiconductor
  88.  
  89. --------------------- el snip-o ------------------------------
  90. #!/bin/csh -f
  91. #
  92. # Name:       cheklib
  93. # Author:     Doug Bell, dougbell@berlioz, 408-721-4308
  94. # Purpose:    Compare User code extern symbols with libraries
  95. # Version:    IBM AIX
  96. # Algorithm:  Generate via ar a user extern symbol list. 
  97. #             Generate libraries extern symbol list. Deduce conflict.
  98. # Dependencies:  csh, ar, awk, sed, sort, uniq, comm, join, rm, cat, set
  99. # Comments:   Output is sent directly to standard output
  100. # Revision history (latest first):
  101. # +-----+----------+---------------------------------------------------------+
  102. # | Who |   When   | What                                                    |
  103. # +-----+----------+---------------------------------------------------------+
  104. # |  db |  3/27/92 | Version 1.0  Original.                                  |
  105. # +-----+----------+---------------------------------------------------------+
  106.   #--------------------------------------------------------------------#
  107.   # SET the dir location of the users *.o compiled o/p object files    #
  108.   #--------------------------------------------------------------------#
  109.   set user = *.o
  110.   #--------------------------------------------------------------------#
  111.   # SET the compiler and system libraries used by Makefile             #
  112.   #--------------------------------------------------------------------#
  113.   #-----------------------------------#
  114.   # AIX/370 fvs VS Fortran libraries. Check ld map ...ld -m            #
  115.   #-----------------------------------#
  116. # set libs = ( /usr/lib/libfvs.a \
  117. #                  /lib/libc.a   )
  118.   #-----------------------------------#
  119.   # AIX 3.2 xlf XL Fortran libraries. Check ld map ...ld -bl:load.map  #
  120.   #-----------------------------------#
  121.   set libs = ( /usr/lib/libxlf.a     \
  122.                /usr/lib/libcurses.a  \
  123.                /usr/lib/libtermcap.a \
  124.                /usr/lib/libc.a       \
  125.                /usr/lib/libm.a       )
  126.   #--------------------------------------------------------------------
  127.   #
  128.   # Gen extern symbol list from an .a archive lib of users *.o files
  129.   #
  130.   echo .
  131.   echo Check user compiled output binaries.
  132.   if( -e tempU.a &&! -z tempU.a ) rm tempU.a
  133.   ar -qc tempU.a $user
  134.   ar -w  tempU.a > tempU.x1
  135.   rm     tempU.a
  136.   sed "s/_//g"     tempU.x1  | sort -o tempU.two
  137.   awk '{print $1}' tempU.two | cat   > tempU.one
  138.   #
  139.   # Gen extern symbol list from system libraries
  140.   #
  141.   echo Check system libraries:
  142.   if ( -e tempL.two &&! -z tempL.two ) rm tempL.two
  143.   foreach  dd ($libs)
  144.     echo  $dd
  145.     ar -w $dd >>   tempL.two
  146.   end
  147.   awk '{print $1}' tempL.two | cat   > tempL.z1
  148.   sed "s/_//g"     tempL.z1  | sort -o tempL.z2
  149.   uniq tempL.z2    tempL.one
  150.   #
  151.   # Deduce if there are any user extern symbol conflicts with libraries
  152.   #
  153.   comm -12 tempL.one tempU.one > tempU.out
  154.   join     tempU.two tempU.out > tempU.final
  155.   if ( -e tempU.final &&! -z tempU.final ) then
  156.     echo User external symbol conflict found with system libraries:
  157.     echo extern program-file
  158.     echo ------ ------------
  159.     cat tempU.final
  160.     echo .
  161.   else
  162.     echo No user extern symbol conflict found with system libraries.
  163.   endif
  164.  
  165.   rm tempL.* tempU.*
  166.  
  167. # End-Of-This
  168.  
  169.  
  170.