From 44a3a031475cd7bc1fceae23cf99baf3b57d0f01 Mon Sep 17 00:00:00 2001 From: Paul Mathieu Date: Mon, 22 Feb 2021 20:35:09 -0800 Subject: [PATCH] Fix relocs --- tools/ld.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ld.py b/tools/ld.py index ece8b9f..13af449 100644 --- a/tools/ld.py +++ b/tools/ld.py @@ -52,7 +52,7 @@ def do_relocs(secmap, relocs): target_addr = namemap[reloc.target][0] reg = buff[reloc.offset] & 0xf buff[reloc.offset+0:reloc.offset+4] = [ - 0xf0 | reg, (target_addr >> 0) & 0xff, + 0xe0 | reg, (target_addr >> 0) & 0xff, 0x90 | reg, (target_addr >> 8) & 0xff, ] sec.text = bytes(buff)