gnupic: Re: [gnupic] "pagesel $" dup error


Previous by date: 17 Nov 2006 15:52:07 +0000 "pagesel $" dup error, David Barnett
Next by date: 17 Nov 2006 15:52:07 +0000 Re: [gnupic] gpasm macros/defines, David Barnett
Previous in thread:
Next in thread: 17 Nov 2006 15:52:07 +0000 Re: [gnupic] "pagesel $" dup error, David Barnett

Subject: Re: [gnupic] "pagesel $" dup error
From: "David Barnett" ####@####.####
Date: 17 Nov 2006 15:52:07 +0000
Message-Id: <094301c70a5f$e8210f00$0401a8c0@barnett2>

----- Original Message ----- 
From: "David Barnett" ####@####.####
To: ####@####.####
Sent: Wednesday, November 15, 2006 11:40 AM
Subject: [gnupic] "pagesel $" dup error


> I got a "duplicate label (_$_000088)" message from gpasm on a "pagesel $" 
> instruction.  I commented it out and it works fine.  It even works when
> assembling for a different PIC (16F73 instead of 16F876A).  The code in 
> question goes through several levels of include/macro-type indirection.
>
> Can anyone shed some light on this error?

I found the problem.  It's a bug in gpasm.  I attached a simple asm file 
that exploits the bug.

The code is relocatable.  gpasm generates the relocatable symbol for '$' as 
('_$_' + line offset).  There was a coincidence here that two code sections 
referred to '$' at the same offset and created a duplicate label.  To fix 
this, we could add the code section name into the label or add in some kind 
of global counter.

Any suggestions?

David 

[Content type application/octet-stream not shown. Download]

Previous by date: 17 Nov 2006 15:52:07 +0000 "pagesel $" dup error, David Barnett
Next by date: 17 Nov 2006 15:52:07 +0000 Re: [gnupic] gpasm macros/defines, David Barnett
Previous in thread:
Next in thread: 17 Nov 2006 15:52:07 +0000 Re: [gnupic] "pagesel $" dup error, David Barnett


Powered by ezmlm-browse 0.20.