public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Linking nominally incompatible object files
@ 2004-05-02 16:41 Bernd Jendrissek
  2004-05-05 16:26 ` Nick Clifton
  0 siblings, 1 reply; 6+ messages in thread
From: Bernd Jendrissek @ 2004-05-02 16:41 UTC (permalink / raw)
  To: binutils

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello, me again.

While I have a v850 toolchain (GCC + binutils), I'm working on hacking a
copy of the v850 bits so that I can link in libraries supplied by Green
Hills (EM_V800 not EM_V850, different relocs).

So I have a mix of GCC-compiled v850 object files, and Green Hills v800
(what I've called my "new" target) libraries.  When I link them all
together, I get:

+ /mnt/disk2/src/binutils-build/ld/ld-new -e __start -L../../../../../SDK/Lib ../../../../../SDK/Lib/crtPulsarPlus.o -lstartup -lsys
 -lind -larch -lsedgnoe -lansi ../../../../../SDK/Lib/lCore.a -o emv.elf aim.o circbuf.o emv.o file.o mafif.o main.o sps.o swevent_m
an.o tlv.o trace.o utils.o ../../../../manapp/Source/Common/data_store.o ../../../../manapp/Source/Common/event.o ../../../../manapp
/Source/Common/mailbox.o ../../../../manapp/Source/Common/memory.o
lt-ld-new: warning: v850 architecture of input file `aim.o' is incompatible with v850e output
lt-ld-new: warning: v850 architecture of input file `circbuf.o' is incompatible with v850e output

...

reloc type 2 not SUPPORTED
aim.o(.text+0x2c): In function `AimEventHandler':
/mnt/disk2/src/emv/sc5000/dev/PayApp/Emv/MafApp/Source/aim.c:42: internal error: unsupported relocation error

...

The weird thing is, that aim.o is generated by the v850 toolchain, so
its relocs cannot possibly be completely alien (if I link with the
v850-ld and remove all the v800 libraries, the errors are "undefined
reference", not "unsupported relocation").

Is the linker supposed to interpret the relocs based on the input file
format (would be nice) or based on the output file format?  Because,
what seems to be happening now, is that the linker sees relocs in an
input file of format A, but those relocs get misinterpreted as relocs in
format B, and I get segfaults.

Should I just give up now, while I can, before I involuntarily end up as
a BFD hacker?

- -- 
http://voyager.abite.co.za/~berndj/ (f1084a555d2098411cff4cefd41d2e2a1c85d18c)
"years from now, we'll look back on this, laugh nervously and quickly
change the subject" - lee
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFAlSNb/FmLrNfLpjMRAmtFAKCPGToQjpHxiFPf+2B3k90BCKOT7ACcCQT/
J3LhFhbb9mtnoUTRhOdGOk4=
=1Mxe
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-05-07 14:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-02 16:41 Linking nominally incompatible object files Bernd Jendrissek
2004-05-05 16:26 ` Nick Clifton
2004-05-05 18:20   ` Bernd Jendrissek
2004-05-06 13:32     ` Nick Clifton
2004-05-07  9:07       ` Bernd Jendrissek
2004-05-07 14:00         ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).