summaryrefslogtreecommitdiff
path: root/tools/mpy-tool.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-12-10 14:57:12 +1100
committerDamien George <damien.p.george@gmail.com>2019-12-12 20:15:28 +1100
commitfc97d6d1b5f4c249e755e9190518aad8020980ba (patch)
tree39eb8b8ac0fb217022b29f6086e014afb2c417f3 /tools/mpy-tool.py
parent111d1ffb6473950274bb506e1a27c01b33ea3d61 (diff)
tools/mpy-tool.py: Raise exception if trying to freeze relocatable mpy.
Diffstat (limited to 'tools/mpy-tool.py')
-rwxr-xr-xtools/mpy-tool.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/mpy-tool.py b/tools/mpy-tool.py
index 8bc37734c..77a129944 100755
--- a/tools/mpy-tool.py
+++ b/tools/mpy-tool.py
@@ -474,6 +474,9 @@ class RawCodeNative(RawCode):
assert 0
def freeze(self, parent_name):
+ if self.prelude[2] & ~0x0f:
+ raise FreezeError('unable to freeze code with relocations')
+
self.freeze_children(parent_name)
# generate native code data