From c9c7f1be46569c655ca03fade9ece2e44df93e0d Mon Sep 17 00:00:00 2001 From: uuuvn <83587632+uuuvn@users.noreply.github.com> Date: Sun, 5 Jan 2025 23:00:21 +0200 Subject: [PATCH] Remove unused R_AARCH64_CALL26 relocation (#8508) First iteration of the AMX fix was using symbol lookup + trampoline approach which required this, however later i replaced it by marking amx function `static` and assumed that relocation was still used when callee wasn't inlined, however this turned out not to be the case because the callee can't be moved around by linker at link-time and can't be overloaded by other symbols (`static` means priority + local visibility) --- tinygrad/runtime/support/elf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tinygrad/runtime/support/elf.py b/tinygrad/runtime/support/elf.py index 2e1c228e21..0e3391186d 100644 --- a/tinygrad/runtime/support/elf.py +++ b/tinygrad/runtime/support/elf.py @@ -46,7 +46,6 @@ def relocate(instr: int, ploc: int, tgt: int, r_type: int): rel_pg = (tgt & ~0xFFF) - (ploc & ~0xFFF) return instr | (getbits(rel_pg, 12, 13) << 29) | (getbits(rel_pg, 14, 32) << 5) case libc.R_AARCH64_ADD_ABS_LO12_NC: return instr | (getbits(tgt, 0, 11) << 10) - case libc.R_AARCH64_CALL26: return instr | getbits(tgt, 2, 27) case libc.R_AARCH64_LDST16_ABS_LO12_NC: return instr | (getbits(tgt, 1, 11) << 10) case libc.R_AARCH64_LDST32_ABS_LO12_NC: return instr | (getbits(tgt, 2, 11) << 10) case libc.R_AARCH64_LDST64_ABS_LO12_NC: return instr | (getbits(tgt, 3, 11) << 10)