From 279ca435561dc1d5e9f70df052c7ccb75943c137 Mon Sep 17 00:00:00 2001 From: Artur Grabowski Date: Fri, 8 Jun 2001 06:52:33 +0000 Subject: Cleanup. exit when the bootstrap relocation fails. --- libexec/ld.so/alpha/archdep.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libexec/ld.so/alpha/archdep.h b/libexec/ld.so/alpha/archdep.h index 365d4c38260..96a2f3f2163 100644 --- a/libexec/ld.so/alpha/archdep.h +++ b/libexec/ld.so/alpha/archdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: archdep.h,v 1.2 2001/05/31 13:26:09 art Exp $ */ +/* $OpenBSD: archdep.h,v 1.3 2001/06/08 06:52:32 art Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -130,19 +130,20 @@ RELOC_RELA(Elf64_Rela *r, const Elf64_Sym *s, Elf64_Addr *p, unsigned long v) { extern Elf_Addr _GLOBAL_OFFSET_TABLE_[]; - if(ELF64_R_TYPE(r->r_info) == RELOC_RELATIVE) { + if (ELF64_R_TYPE(r->r_info) == RELOC_RELATIVE) { if ((caddr_t)p < (caddr_t)_GLOBAL_OFFSET_TABLE_ || (caddr_t)p >= (caddr_t)&_DYNAMIC) *p += (Elf_Addr)v; - } else if(ELF64_R_TYPE(r->r_info) == RELOC_JMP_SLOT) { + } else if (ELF64_R_TYPE(r->r_info) == RELOC_JMP_SLOT) { Elf64_Addr val = v + s->st_value + r->r_addend - (Elf64_Addr)(p); *p = val; __asm __volatile("imb" : : : "memory"); - } else if(ELF64_R_TYPE(r->r_info) == RELOC_GLOB_DAT) { + } else if (ELF64_R_TYPE(r->r_info) == RELOC_GLOB_DAT) { *p = v + s->st_value + r->r_addend; } else { _dl_printf("unknown bootstrap relocation\n"); + _dl_exit(6); } } -- cgit v1.2.3