home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / sgi / 11502 < prev    next >
Encoding:
Text File  |  1992-07-28  |  1.8 KB  |  57 lines

  1. Newsgroups: comp.sys.sgi
  2. Path: sparky!uunet!mcsun!sun4nl!fwi.uva.nl!casper
  3. From: casper@fwi.uva.nl (Casper H.S. Dik)
  4. Subject: Incremental linking problem
  5. Message-ID: <1992Jul28.114107.14753@fwi.uva.nl>
  6. Keywords: linking
  7. Sender: news@fwi.uva.nl
  8. Nntp-Posting-Host: adam.fwi.uva.nl
  9. Organization: FWI, University of Amsterdam
  10. Date: Tue, 28 Jul 1992 11:41:07 GMT
  11. Lines: 44
  12.  
  13. Hi,
  14.  
  15. I have some trouble getting dynamic linking to work with
  16. IRIX 4.0.x for more than one object. This is what I do:
  17.  
  18. - ld -A <program> -T <address1> -N -x -o <output> file.o -lc
  19. - ld -A <output> -T <address2> -N -x -o <output2> file2.o -lc
  20.  
  21. The second linking steps fails with:
  22.  
  23. /usr/bin/ld:
  24. -A file defines loader-defined symbol _end
  25.  
  26. The symbol _end is defined because nlist(3) is used in <program>
  27.  
  28. I can load the first object file and call functions in it. Those function
  29. in turn can call functions in <program> or libc.
  30.  
  31. Problems that I have already solved are:
  32.  
  33.     Warning: jump relocation out-of-range, bad object file produced, can't
  34.     jump from 0x100136bc to 0x414240 (symbol name: printf) (call to"printf"
  35.     resolved to a name in a different 256 megabyte memory area:
  36.     the -y option to ld (example: -yprintf ) will show the reference and
  37.     definition locations)
  38.  
  39.     This is solved by linking the <program> with -D 800000 (the executable is
  40.     less than 4MB in size)
  41.  
  42. I want to use the symbol table of the result of the first load, because
  43. of the extra symbols defined. (calling function from file2.o to file.o)
  44.  
  45. For several reasons I can't combine all loads to one commandline.
  46.  
  47. What happens is that end and _end are defined with the same value in
  48. the original executable but with two different values in the resulting
  49. output. My guess is that that is what confuses the linker.
  50.  
  51. Does anyone have a solution?
  52.  
  53. Casper
  54. -- 
  55.                         |    Casper H.S. Dik
  56.                         |    casper@fwi.uva.nl
  57.