bugGNU Development Chain for 68HC11/68HC12 - Bugs: bug #3331, Invalid group relaxation, bset...


You are not allowed to post comments on this tracker with your current authentication level.

bug #3331: Invalid group relaxation, bset uses an invalid address

Submitted by:  Stephane Carrez <ciceron>
Submitted on:  Fri 25 Apr 2003 07:49:59 PM UTC  
Category:  binutils Severity:  4 - Important
Item Group:  sw-bug Status:  Fixed
Privacy:  Public Assigned to:  Stephane Carrez <ciceron>
Open/Closed:  Closed

Sun 27 Apr 2003 08:05:54 AM UTC, comment #2: 

Fixed in binutils 2.14 and release 2.2

Stephane Carrez <ciceron>
Project AdministratorIn charge of this item.
Fri 25 Apr 2003 07:53:42 PM UTC, comment #1: 

This is caused by the fact that there is a relocation
after the relocation marking the relax group, and this
second relocation is against a symbol in page0.  We incorrectly
think that this second relocation is for the relax group
and we activate the relax group optimization.  The result
is that the relax group is made against 'PuntAnalisiTasti'
instead of StatusByte.  The result is a 'bset' against
the 'PuntAnalisiTasti' symbol.

Stephane Carrez <ciceron>
Project AdministratorIn charge of this item.
Fri 25 Apr 2003 07:49:59 PM UTC, original submission:  

In the following program:

void (*PuntAnalisiTasti)() _attribute_ ((section (".page0")));
unsigned char StatusByte;

int _attribute_((noreturn)) main ();
void AnalisiTastiRestore (void);
void AnalisiTasti (void);

void _start (void)
    _asm_ __volatile__ ("lds #0x7fff");
int main ()
     while (1)

void AnalisiTasti (void)
    StatusByte |= 0x01;
    PuntAnalisiTasti = AnalisiTastiRestore;

void AnalisiTastiRestore (void)

when it is compiled with -mrelax, the 'bset' generated
in AnalisiTasti is using an invalid address (0) and it
does not use the original 'ldx #StatusByte'.  It is wrong
because StatusByte is not in page0.

Stephane Carrez <ciceron>
Project AdministratorIn charge of this item.


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.




Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2003-04-27 ciceron Open/ClosedOpen => (Error - Not Found)
2003-04-27 ciceron StatusNone => (Error - Not Found)

Back to the top

Powered by Savane 3.5