Fix relocs
This commit is contained in:
parent
edf167ff2b
commit
44a3a03147
@ -52,7 +52,7 @@ def do_relocs(secmap, relocs):
|
|||||||
target_addr = namemap[reloc.target][0]
|
target_addr = namemap[reloc.target][0]
|
||||||
reg = buff[reloc.offset] & 0xf
|
reg = buff[reloc.offset] & 0xf
|
||||||
buff[reloc.offset+0:reloc.offset+4] = [
|
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,
|
0x90 | reg, (target_addr >> 8) & 0xff,
|
||||||
]
|
]
|
||||||
sec.text = bytes(buff)
|
sec.text = bytes(buff)
|
||||||
|
Loading…
Reference in New Issue
Block a user