home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sgi
- Path: sparky!uunet!mcsun!sun4nl!fwi.uva.nl!casper
- From: casper@fwi.uva.nl (Casper H.S. Dik)
- Subject: Incremental linking problem
- Message-ID: <1992Jul28.114107.14753@fwi.uva.nl>
- Keywords: linking
- Sender: news@fwi.uva.nl
- Nntp-Posting-Host: adam.fwi.uva.nl
- Organization: FWI, University of Amsterdam
- Date: Tue, 28 Jul 1992 11:41:07 GMT
- Lines: 44
-
- Hi,
-
- I have some trouble getting dynamic linking to work with
- IRIX 4.0.x for more than one object. This is what I do:
-
- - ld -A <program> -T <address1> -N -x -o <output> file.o -lc
- - ld -A <output> -T <address2> -N -x -o <output2> file2.o -lc
-
- The second linking steps fails with:
-
- /usr/bin/ld:
- -A file defines loader-defined symbol _end
-
- The symbol _end is defined because nlist(3) is used in <program>
-
- I can load the first object file and call functions in it. Those function
- in turn can call functions in <program> or libc.
-
- Problems that I have already solved are:
-
- Warning: jump relocation out-of-range, bad object file produced, can't
- jump from 0x100136bc to 0x414240 (symbol name: printf) (call to"printf"
- resolved to a name in a different 256 megabyte memory area:
- the -y option to ld (example: -yprintf ) will show the reference and
- definition locations)
-
- This is solved by linking the <program> with -D 800000 (the executable is
- less than 4MB in size)
-
- I want to use the symbol table of the result of the first load, because
- of the extra symbols defined. (calling function from file2.o to file.o)
-
- For several reasons I can't combine all loads to one commandline.
-
- What happens is that end and _end are defined with the same value in
- the original executable but with two different values in the resulting
- output. My guess is that that is what confuses the linker.
-
- Does anyone have a solution?
-
- Casper
- --
- | Casper H.S. Dik
- | casper@fwi.uva.nl
-