mirror of
https://github.com/cc65/cc65.git
synced 2024-10-04 03:56:13 +00:00
Print a warning if a bss type segment has both, run and load areas assigned.
git-svn-id: svn://svn.cc65.org/cc65/trunk@1737 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
11306120ea
commit
e84a1c068b
@ -721,9 +721,6 @@ static void ParseSegments (void)
|
|||||||
CfgOptionalComma ();
|
CfgOptionalComma ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Skip the semicolon */
|
|
||||||
CfgConsumeSemi ();
|
|
||||||
|
|
||||||
/* Check for mandatory parameters */
|
/* Check for mandatory parameters */
|
||||||
AttrCheck (S->Attr, SA_LOAD, "LOAD");
|
AttrCheck (S->Attr, SA_LOAD, "LOAD");
|
||||||
|
|
||||||
@ -748,6 +745,14 @@ static void ParseSegments (void)
|
|||||||
CfgGetName (), CfgErrorLine);
|
CfgGetName (), CfgErrorLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If the segment is marked as BSS style, it may not have separate
|
||||||
|
* load and run memory areas, because it's is never written to disk.
|
||||||
|
*/
|
||||||
|
if ((S->Flags & SF_BSS) != 0 && (S->Flags & SF_LOAD_AND_RUN) != 0) {
|
||||||
|
Warning ("%s(%u): Segment with type `bss' has both LOAD and RUN "
|
||||||
|
"memory areas assigned", CfgGetName (), CfgErrorLine);
|
||||||
|
}
|
||||||
|
|
||||||
/* Don't allow read/write data to be put into a readonly area */
|
/* Don't allow read/write data to be put into a readonly area */
|
||||||
if ((S->Flags & SF_RO) == 0) {
|
if ((S->Flags & SF_RO) == 0) {
|
||||||
if (S->Run->Flags & MF_RO) {
|
if (S->Run->Flags & MF_RO) {
|
||||||
@ -782,6 +787,9 @@ static void ParseSegments (void)
|
|||||||
/* Segment does not exist, discard the descriptor */
|
/* Segment does not exist, discard the descriptor */
|
||||||
FreeSegDesc (S);
|
FreeSegDesc (S);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Skip the semicolon */
|
||||||
|
CfgConsumeSemi ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user