* Simple SPARC relocations for the benefit of self-relocation of ld.so
* avoiding the use of global variables (ie. reloc_bitshift[] et. al.).
* Only types supported are RELOC_32 and RELOC_RELATIVE.
* This *must* be a static function, so it is not called through a jmpslot.
md_relocate_simple(r
, relocation
, addr
)
struct relocation_info
*r
;
register unsigned long mask
;
register unsigned long shift
;
relocation
+= (*(long *)addr
& mask
) << shift
;
*(long *) (addr
) &= ~mask
;
*(long *) (addr
) |= relocation
;