mirror of
https://github.com/ksherlock/merlin-utils.git
synced 2024-06-02 08:41:33 +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 &seg = segments[ix];
|
||||||
auto &pending = relocations[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) {
|
for (auto &r : pending) {
|
||||||
assert(r.id < symbol_map.size());
|
assert(r.id < symbol_map.size());
|
||||||
const auto &e = symbol_table[r.id];
|
const auto &e = symbol_table[r.id];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user