/* Linker */
static void set_jump_target(void *addr, void *target)
{
- u_int *ptr = addr;
+ u_int *ptr = NDRC_WRITE_OFFSET(addr);
intptr_t offset = (u_char *)target - (u_char *)addr;
if ((*ptr&0xFC000000) == 0x14000000) { // b
static void output_w32(u_int word)
{
- *((u_int *)out) = word;
+ *((u_int *)NDRC_WRITE_OFFSET(out)) = word;
out += 4;
}
emit_writeword(rt,&mini_ht[(return_address&0xFF)>>3][0]);
}
-static void clear_cache_arm64(char *start, char *end)
+static unused void clear_cache_arm64(char *start, char *end)
{
// Don't rely on GCC's __clear_cache implementation, as it caches
// icache/dcache cache line sizes, that can vary between cores on
static void arch_init(void)
{
uintptr_t diff = (u_char *)&ndrc->tramp.f - (u_char *)&ndrc->tramp.ops;
- struct tramp_insns *ops = ndrc->tramp.ops;
+ struct tramp_insns *ops = NDRC_WRITE_OFFSET(ndrc->tramp.ops);
size_t i;
assert(!(diff & 3));
start_tcache_write(ops, (u_char *)ops + sizeof(ndrc->tramp.ops));