diff --git a/sys/alpha/alpha/elf_machdep.c b/sys/alpha/alpha/elf_machdep.c index 847ab2a8af88..785e2edcfccc 100644 --- a/sys/alpha/alpha/elf_machdep.c +++ b/sys/alpha/alpha/elf_machdep.c @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: elf_machdep.c,v 1.1 1998/09/11 08:47:02 dfr Exp $ + * $Id: elf_machdep.c,v 1.2 1998/10/16 03:54:59 peter Exp $ */ #include @@ -97,7 +97,7 @@ elf_reloc(linker_file_t lf, const void *data, int type, const char *sym) break; case R_ALPHA_RELATIVE: - addr = relocbase + addend; + addr = relocbase + addend + *where; if (*where != addr) *where = addr; break; @@ -112,7 +112,7 @@ elf_reloc(linker_file_t lf, const void *data, int type, const char *sym) default: printf("kldload: unexpected relocation type %d\n", - rtype); + (int) rtype); return -1; } return(0); diff --git a/sys/powerpc/powerpc/elf_machdep.c b/sys/powerpc/powerpc/elf_machdep.c index 847ab2a8af88..785e2edcfccc 100644 --- a/sys/powerpc/powerpc/elf_machdep.c +++ b/sys/powerpc/powerpc/elf_machdep.c @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: elf_machdep.c,v 1.1 1998/09/11 08:47:02 dfr Exp $ + * $Id: elf_machdep.c,v 1.2 1998/10/16 03:54:59 peter Exp $ */ #include @@ -97,7 +97,7 @@ elf_reloc(linker_file_t lf, const void *data, int type, const char *sym) break; case R_ALPHA_RELATIVE: - addr = relocbase + addend; + addr = relocbase + addend + *where; if (*where != addr) *where = addr; break; @@ -112,7 +112,7 @@ elf_reloc(linker_file_t lf, const void *data, int type, const char *sym) default: printf("kldload: unexpected relocation type %d\n", - rtype); + (int) rtype); return -1; } return(0);