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 authentification 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: binutilsSeverity: 4 - Important
Item Group: sw-bugStatus: Fixed
Privacy: PublicAssigned 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");
main();
}
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 click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 27 Apr 2003 08:05:54 AM UTCciceronOpen/ClosedOpen=>(Error - Not Found)
Sun 27 Apr 2003 08:05:53 AM UTCciceronStatusNone=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup