avr-libc-dev
[Top][All Lists]
Advanced

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

[avr-libc-dev] [Bug #3184] XCALL resolved incorrectly in avr5/libc.a


From: nobody
Subject: [avr-libc-dev] [Bug #3184] XCALL resolved incorrectly in avr5/libc.a
Date: Fri, 11 Apr 2003 13:33:47 -0400

=================== BUG #3184: LATEST MODIFICATIONS ==================
http://savannah.nongnu.org/bugs/?func=detailbug&bug_id=3184&group_id=2140

Changes by: Steven Borley <address@hidden>
Date: Fri 04/11/2003 at 17:33 (GMT)

------------------ Additional Follow-up Comments ----------------------------
The attached code is a near minimal program that shows the bug.  The bug happen 
when using itoa(), utoa(), dtostre(), ultoa(), atoi(), atol(), etc. when linked 
code is large (hence needing stdio libraries in the supplied example.

------------------ Additional Bug Attachment  ----------------------------
File name: main.c                         Size:1 KB
Example code demonstrating bug
http://savannah.nongnu.org/bugs/download.php?group_id=2140&amp;bug_id=3184&amp;bug_file_id=390



=================== BUG #3184: FULL BUG SNAPSHOT ===================


Submitted by: joerg_wunsch            Project: AVR C Runtime Library        
Submitted on: Thu 04/10/2003 at 20:13
Category:  Library                    Severity:  7                          
Bug Group:  None                      Resolution:  None                     
Assigned to:  None                    Originator Email:  address@hidden
Status:  Open                         

Summary:  XCALL resolved incorrectly in avr5/libc.a

Original Submission:  In a larger ATmega128 project,
the original submitter of this bug (in AVRfreaks) suddenly
got:

itoa.o(.text+0x20): relocation truncated to fit: R_AVR_13_PCREL __udivmodhi4

This corresponds with

        XCALL   _U(__udivmodhi4);  quotient in r23:r22, remainder in r25:r24
                                ;  clobbered: r0, r21, r26, r27
                                ;  call-used but preserved: r18, r19, r20, r30, 
r31
        subi    r24, 0xd0       ; + '0'

in libc/misc/itoa.S.  XCALL is supposed to be an absolute
call for the avr5 target, but extracting itoa.o from
avr5/libc.a, and disassembling it reveals that it has
been assembled as an rcall.

Other functions migh probably be affected as well.

Follow-up Comments
*******************

-------------------------------------------------------
Date: Fri 04/11/2003 at 17:33       By: steven_borley
The attached code is a near minimal program that shows the bug.  The bug happen 
when using itoa(), utoa(), dtostre(), ultoa(), atoi(), atol(), etc. when linked 
code is large (hence needing stdio libraries in the supplied example.

-------------------------------------------------------
Date: Fri 04/11/2003 at 09:55       By: marekm
common/macros.inc should use "#if __AVR_MEGA__" instead
of "#if FLASHEND > 0x2000" - the latter is only defined for
specific devices (like -mmcu=atmega128), not for -mmcu=avr5.



CC List
*******

CC Address                          | Comment
------------------------------------+-----------------------------
address@hidden     | Steven originally reported the bug.



File Attachments
****************

-------------------------------------------------------
Date: Fri 04/11/2003 at 17:33  Name: main.c  Size: 1KB   By: steven_borley
Example code demonstrating bug
http://savannah.nongnu.org/bugs/download.php?group_id=2140&amp;bug_id=3184&amp;bug_file_id=390


For detailed info, follow this link:
http://savannah.nongnu.org/bugs/?func=detailbug&bug_id=3184&group_id=2140




reply via email to

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