shithub: rgbds

Download patch

ref: b07a8501d6b3a4fd75a73c26637814bde9bedb98
parent: f779e724e22d79cd10e97f936ddab37aa3dd6243
author: Antonio Niño Díaz <[email protected]>
date: Thu Jan 25 17:07:16 EST 2018

Fix linkerscript linking errors

The problems were introduced by the following commits:

- 959bfe2a9dd5ee8d30f740c557502f7d9cd2efff

- 975200834ecefd2c05b5f7b292172d222fa751e8

Signed-off-by: Antonio Niño Díaz <[email protected]>

--- a/src/link/patch.c
+++ b/src/link/patch.c
@@ -65,8 +65,6 @@
 		return n - BANK_INDEX_SRAM;
 	}
 
-	errx(1, "%s: Unknown bank %d", __func__, n);
-
 	return n;
 }
 
--- a/src/link/script.c
+++ b/src/link/script.c
@@ -134,7 +134,7 @@
 			     BANK_COUNT_WRAMX);
 		}
 		current_bank = BANK_INDEX_WRAMX + bank - 1;
-		current_real_bank = bank - 1;
+		current_real_bank = bank;
 		return;
 	} else if (strcmp(type, "SRAM") == 0) {
 		if (bank >= BANK_COUNT_SRAM) {