This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Unsupported relocs on Alpha, Was: BFD 2.16.1 "assertion failure"and "internal error"
- From: Daniel Marques <marques at cs dot cornell dot edu>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 20 Jul 2005 13:49:07 -0400
- Subject: Re: Unsupported relocs on Alpha, Was: BFD 2.16.1 "assertion failure"and "internal error"
- References: <42B99871.7010000@cs.cornell.edu> <42CA8C78.4070308@redhat.com> <42CA8CB7.90805@cs.cornell.edu> <42CAA3E8.3040700@redhat.com> <42CABADB.3030305@cs.cornell.edu> <42CBB314.3050907@redhat.com> <42DD5A0F.9040008@cs.cornell.edu> <42DE36F4.8000204@redhat.com>
Hi Nick,
I have posted a simple example of this bug, generated with gcc on Alpha.
It is availabled online at :
http://www.cs.cornell.edu/marques/bfdexample/alpha_objcopy_bug.tar
I didn't install gcc, so the most I know about it is:
bash-2.04$ gcc -v
Reading specs from
/usr/local/packages/gcc-3.4.0/lib/gcc/alphaev68-dec-osf5.1/3.4.0/specs
Configured with: ../gcc-3.4.0/configure
--prefix=/usr/local/packages/gcc-3.4.0 --enable-threads=posix
--enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.0
That tar ball includes everything to reproduce and examine this bug
(including the .o and executable files produced by running 'make ctests').
The output of that command is:
Running test 3 : C without using objcopy
gcc -c c.c
gcc c.o -o test_c_nocopy
./test_c_nocopy
method c() called
Test completed
Running test 4 : C with using objcopy
gcc -c c.c
objcopy c.o cc.o
BFD: c.o: unknown/unsupported relocation type 17
BFD: c.o: unknown/unsupported relocation type 18
gcc cc.o -o test_c_withcopy
./test_c_withcopy
Test completed
As you can see, using objcopy causes the application to fail to print to
stdout.
Thanks.
Dan
Nick Clifton wrote:
Hi Daniel,
If you recall, the two unsupported Alpha relocs were:
+ case ALPHA_R_GPRELHIGH:
+ case ALPHA_R_GPRELLOW:
Unfortunately, both g++ and DEC C++ will generate those reloc types
(though I don't think I've ever seen a C compiler do so),
Ah - please can you post a *small* testcase which does this. Preferably
for gcc but failing that for g++. (I do not have access to a DEC C++
compiler). Can you also include the command line used to compile the
testcase and details of the gcc/g++ that you used to recreate the bug.
(ie What version of gcc ? How was it configured ? Did it have any
patches applied ?)
Cheers
Nick