Re: [cc65] [ca65] Relative addressing across segments

From: Groepaz <groepaz1gmx.net>
Date: 2012-08-17 07:42:42
On Thursday 16 August 2012, Spiro Trikaliotis wrote:
> Hello,
> 
> I just found out that a relative branch across segments does not work.
> That is, the following does not compile:
> 
> 
>         .segment "CODE1"
> start:  lda #0
>         jmp patch
> patchback:
> ;         ..... some more code
> 
>         .segment "PATCH"
> patch:  sta $dd01
>         beq patchback
> 
> 
> The assembler complains about the branch target out of range, although
> this is not necessarily true. This depends upon the linker config.
> 
> I take this as a limitation in the object file format and/or the linker,
> that is not able to handle these relative relocations. Am I right? Or
> should it work?
> 
> If it is a limitation, are there plans to work on this?

*afaik* this is a sideeffect of how the assembler/linker combo works and can 
not be changed (the entire assembler would have to be moved into the linker).

-- 

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ftp.pokefinder.org

Persönlichkeiten werden nicht durch schöne Reden geformt, sondern durch Arbeit 
und eigene Leistung. 
<Albert Einstein>

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Aug 17 07:42:50 2012

This archive was generated by hypermail 2.1.8 : 2012-08-17 07:42:55 CEST