bugGNU Development Chain for 68HC11/68HC12 - Bugs: bug #1417, Branch wrong after linker...

 
 

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

bug #1417: Branch wrong after linker relaxation

Submitter:  Stephane Carrez <ciceron>
Submitted:  Mon 14 Oct 2002 08:56:16 PM UTC
   
 
Category:  binutils Severity:  6 - Security
Item Group:  sw-bug Status:  Fixed
Privacy:  Public Assigned to:  ciceron
Open/Closed:  Closed

Thu 14 Nov 2002 10:18:12 PM UTC, comment #1: 

Fixed in release 2.1

Stephane Carrez <ciceron>
Group administrator
Mon 14 Oct 2002 08:56:16 PM UTC, original submission:  

When the following example is compiled with -mrelax:

int main (void);
void Call1 (void);
unsigned char Var1         _attribute_ ((section (".page0")));
 
void _start (void)
{
 main();
}
 
int main (void)
{
 if (!Var1)
 {
  Call1();
 }
 Var1 |= 1;
return (0);
}
 
void Call1 (void)
{
}

The branch becomes wrong after linker relaxation.
The result is:

00008003 <main>:
    8003:       7d 00 00        tst     0 <__bss_size>
    8006:       26 ff           bne     8007 <main+0x4>
    8008:       8d 06           bsr     8010 <Call1>
    800a:       14 00 01        bset    *0 <__bss_size> #$01

But the bne should go to 800a.

Note: the bne branch is adjusted but it should not.

Stephane Carrez <ciceron>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2002-11-14 ciceron StatusNone None
    Open/ClosedOpen None

Back to the top

Powered by Savane 3.13-d3ae.
Corresponding source code