mirror of
https://github.com/ksherlock/merlin-utils.git
synced 2025-02-04 23:34:15 +00:00
check for code segments that exceed the bank size.
This commit is contained in:
parent
5269b58365
commit
67f34936c2
5
link.cpp
5
link.cpp
@ -506,6 +506,11 @@ static void resolve(void) {
|
||||
auto &seg = segments[ix];
|
||||
auto &pending = relocations[ix];
|
||||
|
||||
|
||||
if ((seg.kind & 0x0001) == 0x0001 && seg.data.size() > 65535) {
|
||||
throw std::runtime_error("code exceeds bank");
|
||||
}
|
||||
|
||||
for (auto &r : pending) {
|
||||
assert(r.id < symbol_map.size());
|
||||
const auto &e = symbol_table[r.id];
|
||||
|
Loading…
x
Reference in New Issue
Block a user