Menu ▾ ▴

#4160 sdcc linker option not accepting -b area base address arguments

closed-invalid
None
other
5
2026-10-20
2026-10-19
Under4Mhz
No

Running sdcc with the below compiler switches produces the error:

sdcc -mz80 --no-std-crt0 template.c  -Wl-b_BANK2=0x8000
?ASlink-Warning-Unkown option -b ignored
?ASlink-Warning-Unkown option -_ ignored
?ASlink-Warning-Unkown option -B ignored
?ASlink-Error-No definition of area NK2

This worked fine in previous versions.

$ sdld -b_BANK2=0x8000
ASlink >> 
ASlink >> -_
?ASlink-Warning-Unkown option -_ ignored
ASlink >> 
ASlink >> 
?ASlink-Error-Missing input file(s)

I've never tried running the linker directly before, but I would expect this to work as well.

SDCC : z80/sm83/ez80/z80n/mos6502/mos65c02/huc6280 4.6.4 #17016 (Linux)

Discussion

  • Gabriele Gorla

    Gabriele Gorla - 2026-10-19

    The option area base was recently changed to -a to follow upstream asxxxx.

     
    • Under4Mhz

      Under4Mhz - 2026-10-20

      It might be worth considering leaving the existing switch in place with a deprecated warning, on top of the new switch. I suspect there might be other people like me who won't realise the cause of the error.

       
      • Philipp Klaus Krause

        Since -b is now used in upstream asxxxx for a different purpose, I think users should move fast. The hard error should help with that. So an entry in the section of the manual on backward compatibility, and a version number bump, and doing it with a few months of distance to the next release is what we did.

         

        Last edit: Philipp Klaus Krause 2026-10-20
  • Philipp Klaus Krause

    • status: open --> closed-invalid
    • assigned_to: Philipp Klaus Krause
     

Log in to post a comment.