1 /* $NetBSD: md-static-funcs.c,v 1.3 1998/01/05 22:00:45 cgd Exp $ */
4 * Simple SPARC relocations for the benefit of self-relocation of ld.so
5 * avoiding the use of global variables (ie. reloc_bitshift[] et. al.).
6 * Only types supported are RELOC_32 and RELOC_RELATIVE.
8 * This *must* be a static function, so it is not called through a jmpslot.
11 md_relocate_simple(r
, relocation
, addr
)
12 struct relocation_info
*r
;
31 relocation
+= (*(long *)addr
& mask
) << shift
;
35 *(long *) (addr
) &= ~mask
;
36 *(long *) (addr
) |= relocation
;