This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Why do I have "UNKNOWN" relocs in my v850 crt*.o?


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message

Hello all

I'm somewhat fed up with always having to put up with expensive
proprietary development tools that then *still* insist on obnoxious
splash screens and floating licences.  (Windows notworking makes the
licence server inaccessible to me - long story.)

Then, the other day, I was overjoyed to see that both binutils and GCC
supported v850, the processor the VeriFone SC5000 pinpad uses.  I now
seem to have a toolchain that wants to work, but...

$ Reading specs from /usr/cross/lib/gcc-lib/v850/3.3.3/specs
v850-gcc: unrecognized option `-nostdlibs'
Configured with: /usr/src/home/rpmtest/tmp/BUILD/gcc-3.3.1/configure --srcdir=/usr/src/home/rpmtest/tmp/BUILD/gcc-3.3.1 --prefix=/usr/cross --mandir=/usr/cross/v850/man --infodir=/usr/cross/v850/info --target=v850 --with-gcc --with-as=/usr/cross/bin/v850-as --with-ld=/usr/cross/bin/v850-ld --with-slibdir=/lib --with-gxx-include-dir=/usr/cross/v850/mingw32/include/g++-v3 --without-x --disable-nls --disable-shared --enable-threads --enable-languages=c --enable-libgcj --disable-java-awt --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchronization --enable-sjlj-exceptions --with-dwarf3 --with-system-zlib
Thread model: single
gcc version 3.3.3
 /usr/cross/bin/v850-ld -o foo -L ../../../SDK/Lib -L/usr/cross/lib/gcc-lib/v850/3.3.3 -L/usr/cross/lib/gcc-lib/v850/3.3.3/../../../../v850/lib ../../../SDK/Lib/crtPulsarPlus.o ../../../SDK/Lib/crt0.o AppMain.o -lgcc -lc -lgcc
/usr/cross/bin/v850-ld: ../../../SDK/Lib/crtPulsarPlus.o: Relocations in generic ELF (EM: 36)
../../../SDK/Lib/crtPulsarPlus.o: could not read symbols: File in wrong format

$ objdump -b elf32-v850 -m v850 -r ../../../SDK/Lib/crtPulsarPlus.o

../../../SDK/Lib/crtPulsarPlus.o:     file format elf32-little

RELOCATION RECORDS FOR [.text]:
OFFSET   TYPE              VALUE 
000000ba UNKNOWN           .text+0x000000be
000000d0 UNKNOWN           ___dotsyscall
000000d6 UNKNOWN           ___ghsbegin_rosdata
000000da UNKNOWN           ___ghsbegin_rosdata
000000f2 UNKNOWN           __ep
000000f6 UNKNOWN           __ep
000000fe UNKNOWN           .text+0x000000be
000000fe UNKNOWN           ___callt_table
00000102 UNKNOWN           .text+0x000000be
00000102 UNKNOWN           ___callt_table
00000118 UNKNOWN           .text+0x000000be
00000118 UNKNOWN           .text+0x000001dc
0000011c UNKNOWN           .text+0x000000be
0000011c UNKNOWN           .text+0x000001dc
00000120 UNKNOWN           ___ghs_ind_crt0
000001dc UNKNOWN           ___ghsbegin_picbase
000001e0 UNKNOWN           ___ghsbegin_robase
000001e4 UNKNOWN           ___ghsbegin_pidbase

Here's the hexdump for what I think is the relocation at 00000120:

2001 0000 160d 0000 0000 0000

0x16 = 22, which is the reloc number for R_V850_CALLT_16_16_OFFSET.
That seems to make sense at first glance, as the disassembly for
another, linked binary (produced with the Green Hills toolchain) shows a
call to __ghs_ind_crt0 at that point.

Why is this reloc UNKNOWN?  Is this why ld complains when it tries to
link this file?

I should add, quickly, that crtPulsarPlus.o is (I think) from the Green
Hills SDK; I did *not* hand-assemble it.  Is there something "wrong"
with the ELF produced either by their compiler/assembler or with
binutils ld?

So, should I pray to the binutils gods to fix something in binutils, or
should I hand-code my own crt stuff (sounds fun) or should I just dig a
little deeper and RTFM?  Please help - I wanna use my free tools!


BTW, here's a patch I needed to make ld shut up about "unsupported
emulation":

diff -u binutils-2.14.90.0.8/ld/Makefile.am.borig binutils-2.14.90.0.8/ld/Makefile.am
--- binutils-2.14.90.0.8/ld/Makefile.am.borig	Wed Jan 14 23:07:52 2004
+++ binutils-2.14.90.0.8/ld/Makefile.am	Fri Mar 19 18:15:09 2004
@@ -351,6 +351,7 @@
 	evax.o \
 	evaxnbsd.o \
 	evsta.o \
+	ev850.o \
 	ew65.o \
 	ez8001.o \
 	  eelf32frvfd.o \
diff -u binutils-2.14.90.0.8/ld/Makefile.in.borig binutils-2.14.90.0.8/ld/Makefile.in
--- binutils-2.14.90.0.8/ld/Makefile.in.borig	Wed Jan 14 23:07:52 2004
+++ binutils-2.14.90.0.8/ld/Makefile.in	Fri Mar 19 18:15:24 2004
@@ -465,6 +465,7 @@
 	evax.o \
 	evaxnbsd.o \
 	evsta.o \
+	ev850.o \
 	ew65.o \
 	ez8001.o \
 	  eelf32frvfd.o \

Was there any particular (other than being forgotten) reason why the
v850 emulation was left out?

-- 
"IBM has more patent litigation lawyers than SCO has employees." - unknown
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFAYZdp/FmLrNfLpjMRAl9nAJ0UHVtpuA6mxrM9BvUZwQniGzIkhwCgglKE
9kHQFIl1vSwCqDwptfwrqG0=
=6L/V
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]