tools/mpy-tool.py: Raise exception if trying to freeze relocatable mpy.

This commit is contained in:
Damien George 2019-12-10 14:57:12 +11:00
parent 111d1ffb64
commit fc97d6d1b5
1 changed files with 3 additions and 0 deletions

View File

@ -474,6 +474,9 @@ class RawCodeNative(RawCode):
assert 0 assert 0
def freeze(self, parent_name): def freeze(self, parent_name):
if self.prelude[2] & ~0x0f:
raise FreezeError('unable to freeze code with relocations')
self.freeze_children(parent_name) self.freeze_children(parent_name)
# generate native code data # generate native code data