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 authentification level.

bug #1417: Branch wrong after linker relaxation

Submitted by:  Stephane Carrez <ciceron>
Submitted on:  Mon Oct 14 20:56:16 2002  
Category: binutilsSeverity: 6 - Security
Item Group: sw-bugStatus: Fixed
Privacy: PublicAssigned to: Stephane Carrez <ciceron>
Open/Closed: Closed

Thu Nov 14 22:18:12 2002, comment #1:

Fixed in release 2.1

Stephane Carrez <ciceron>
Project AdministratorIn charge of this item.
Mon Oct 14 20:56:16 2002, 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)

int main (void)
if (!Var1)
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>
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
Thu Nov 14 22:18:12 2002ciceronStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)

Back to the top

Powered by Savane 3.1-cleanup1