avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] tool chain bug


From: Theodore A. Roth
Subject: Re: [avr-gcc-list] tool chain bug
Date: Thu, 26 Sep 2002 11:22:35 -0700 (PDT)

I think the attached patch for gcc solves this problem. (linker error as
such: "relocation truncated to fit: R_AVR_7_PCREL no symbol") I'm still
trying to verify that the resulting code is correct (my app I'm working on
is broken in other ways right now itself ;-)

Can I enlist some people on the list experiencing this problem to try the
patch? The problem seems to have been born in a change to binutils on Sept
5, so you'll need binutils from cvs after that date.

Don't forget to recompile avr-libc with the patched gcc or you will
continue to get the link err if you are using malloc (maybe others too).

Ted Roth

On Thu, 26 Sep 2002, Marek Michalkiewicz wrote:

:) > The avr-gcc generate the following sequence:
:) > _PC_ = 2
:) > ...
:) > ...
:) > ...
:) > brne _PC_-NNN
:) >
:) > Old GAS resolved `_PC_-NNN' as constant expression.
:) > May be something changed in expression handling code in GAS :( and new
:) > GAS resolve `_PC_-NNN' as expression which must be corrected at link
:) > stage. But, as I remember, I don't support linking of 7-bit PC
:) > relative relocations (BFD_RELOC_AVR_7_PCREL).
:)
:) I guess the bug could be worked around in GCC by replacing all uses of _PC_
:) with one time labels.  Not very difficult, except that there are a lot of
:) places to change, it is easy to make a mistake, and 3.3 is close...
:)
:) > PS: I'm very busy now and I can't fix this bug.
:)
:) Same here, unfortunately.  It may be a good idea to go back to the stable
:) binutils 2.13 release for a while.
:)
:) Marek
:)

Attachment: gcc-remove-_PC_.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]