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]

Re: Unsupported relocs on Alpha, Was: BFD 2.16.1 "assertion failure"and "internal error"


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



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