Added tests for warnings or errors that now have notifications.

This commit is contained in:
Kugel Fuhr
2025-07-14 12:59:52 +02:00
parent 170ddc6e33
commit 4120f35276
13 changed files with 51 additions and 2 deletions

View File

@@ -787,8 +787,8 @@ static void PrintUnresolved (ExpCheckFunc F, void* Data)
for (J = 0; J < Count; ++J) {
const LineInfo* LI = CollConstAt (&Imp->RefLines, J);
PWarning (GetSourcePos (LI),
"Unresolved external `%s'",
Name);
"Unresolved external `%s'",
Name);
}
}
Imp = Imp->Next;

View File

@@ -0,0 +1,11 @@
MEMORY {
ZP: file = "", start = $80, size = $001F;
MAIN: file = %O, start = %S, size = $1000;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
CODE: load = MAIN, type = rw;
RODATA: load = MAIN, type = rw;
DATA: load = MAIN, type = rw;
BSS: load = MAIN, type = bss;
}

View File

@@ -0,0 +1,6 @@
.code
.byte 5
.bss
.byte 3

View File

@@ -0,0 +1,11 @@
MEMORY {
ZP: file = "", start = $80, size = $001F;
MAIN: file = %O, start = %S, size = $100;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
CODE: load = MAIN, type = rw;
RODATA: load = MAIN, type = rw;
DATA: load = MAIN, type = rw;
BSS: load = MAIN, type = bss;
}

View File

@@ -0,0 +1,4 @@
.code
.res 256, 3
.byte $FF

View File

@@ -0,0 +1,6 @@
MEMORY {
MAIN: file = %O, start = %S, size = $1000;
}
SEGMENTS {
CODE: load = MAIN, type = rwx;
}

View File

@@ -0,0 +1,4 @@
.bss
.byte 3

View File

@@ -0,0 +1 @@


View File

@@ -0,0 +1,2 @@
170-ld-errormsg.cfg:10: Warning: Segment 'BSS' with type 'bss' contains initialized data
170-ld-errormsg.cfg:10: Note: Initialized data comes at least partially from '<<<#PATH#>>>'

View File

@@ -0,0 +1,2 @@
171-ld-errormsg.cfg:3: Warning: Segment 'CODE' overflows memory area 'MAIN' by 1 byte
ld65: Error: Cannot generate most of the files due to memory area overflow

View File

@@ -0,0 +1,2 @@
172-ld-errormsg.cfg:5: Error: Segment type expected but got 'RWX'
172-ld-errormsg.cfg:5: Note: You may use one of 'RO', 'RW', 'BSS', 'ZP' or 'OVERWRITE'