summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-06-08 06:52:33 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-06-08 06:52:33 +0000
commit279ca435561dc1d5e9f70df052c7ccb75943c137 (patch)
tree6eab87bcc1dd2d5400e5c7496e5854db6258e61f
parent880e92bb080b7448dbf59691da7258c6c6a340cb (diff)
Cleanup.
exit when the bootstrap relocation fails.
-rw-r--r--libexec/ld.so/alpha/archdep.h9
1 files 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);
}
}