From b2967ff5093750a08eb98eacc983b7cabf3deeef Mon Sep 17 00:00:00 2001 From: Rangi <35663410+Rangi42@users.noreply.github.com> Date: Wed, 16 Sep 2026 23:32:15 -0400 Subject: [PATCH] Correct rgblink(5) linkerscript doc to match behavior of unbanked `ROMX`/`WRAMX` (#2103) --- man/rgblink.5 | 3 --- test/link/linkerscript-no-bank.asm | 8 ++++++++ test/link/linkerscript-no-bank.flags | 1 + test/link/linkerscript-no-bank.link | 6 ++++++ test/link/linkerscript-no-bank.out | 5 +++++ 5 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 test/link/linkerscript-no-bank.asm create mode 100644 test/link/linkerscript-no-bank.flags create mode 100644 test/link/linkerscript-no-bank.link create mode 100644 test/link/linkerscript-no-bank.out diff --git a/man/rgblink.5 b/man/rgblink.5 index a9611296..faee43be 100644 --- a/man/rgblink.5 +++ b/man/rgblink.5 @@ -73,14 +73,11 @@ and .Ic HRAM . The bank number can be omitted from the types that only contain a single bank, which are: .Ic ROM0 , -.Ic ROMX No if Fl t No is passed to Xr rgblink 1 , .Ic VRAM No if Fl d No is passed to Xr rgblink 1 , .Ic WRAM0 , -.Ic WRAMX No if Fl w No is passed to Xr rgblink 1 , .Ic OAM , and .Ic HRAM . -.Pq Ic SRAM No is the only type that can never have its bank number omitted. .Pp After a bank specification, the .Dq current address diff --git a/test/link/linkerscript-no-bank.asm b/test/link/linkerscript-no-bank.asm new file mode 100644 index 00000000..4326e761 --- /dev/null +++ b/test/link/linkerscript-no-bank.asm @@ -0,0 +1,8 @@ +SECTION "rom", ROMX +Label:: db 42 + +SECTION "wram", WRAMX +wLabel:: ds 1 + +SECTION "vram", VRAM +vLabel:: ds 1 diff --git a/test/link/linkerscript-no-bank.flags b/test/link/linkerscript-no-bank.flags new file mode 100644 index 00000000..4467fc30 --- /dev/null +++ b/test/link/linkerscript-no-bank.flags @@ -0,0 +1 @@ +-t -d diff --git a/test/link/linkerscript-no-bank.link b/test/link/linkerscript-no-bank.link new file mode 100644 index 00000000..cd93d310 --- /dev/null +++ b/test/link/linkerscript-no-bank.link @@ -0,0 +1,6 @@ +ROMX + "rom" +WRAMX + "wram" +VRAM + "vram" diff --git a/test/link/linkerscript-no-bank.out b/test/link/linkerscript-no-bank.out new file mode 100644 index 00000000..3a18d463 --- /dev/null +++ b/test/link/linkerscript-no-bank.out @@ -0,0 +1,5 @@ +error: A bank number must be specified for ROMX + at linkerscript-no-bank.link(1) +error: A bank number must be specified for WRAMX + at linkerscript-no-bank.link(3) +Linking failed with 2 errors