diff options
-rw-r--r-- | libexec/ld.so/aarch64/rtld_machine.c | 6 | ||||
-rw-r--r-- | libexec/ld.so/alpha/rtld_machine.c | 7 | ||||
-rw-r--r-- | libexec/ld.so/amd64/rtld_machine.c | 6 | ||||
-rw-r--r-- | libexec/ld.so/arm/rtld_machine.c | 6 | ||||
-rw-r--r-- | libexec/ld.so/i386/rtld_machine.c | 6 | ||||
-rw-r--r-- | libexec/ld.so/m88k/rtld_machine.c | 7 | ||||
-rw-r--r-- | libexec/ld.so/powerpc/rtld_machine.c | 38 | ||||
-rw-r--r-- | libexec/ld.so/sh/rtld_machine.c | 6 | ||||
-rw-r--r-- | libexec/ld.so/sparc64/rtld_machine.c | 6 |
9 files changed, 9 insertions, 79 deletions
diff --git a/libexec/ld.so/aarch64/rtld_machine.c b/libexec/ld.so/aarch64/rtld_machine.c index b539ef3aa1f..3429459cb9d 100644 --- a/libexec/ld.so/aarch64/rtld_machine.c +++ b/libexec/ld.so/aarch64/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.9 2019/08/06 04:01:41 guenther Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.10 2019/10/05 00:08:50 guenther Exp $ */ /* * Copyright (c) 2004 Dale Rahn @@ -126,10 +126,6 @@ _dl_md_reloc(elf_object_t *object, int rel, int relsz) for (i = 0; i < relrel; i++, rels++) { Elf_Addr *where; -#ifdef DEBUG - if (ELF_R_TYPE(rels->r_info) != R_TYPE(RELATIVE)) - _dl_die("RELCOUNT wrong"); -#endif where = (Elf_Addr *)(rels->r_offset + loff); *where += loff; } diff --git a/libexec/ld.so/alpha/rtld_machine.c b/libexec/ld.so/alpha/rtld_machine.c index c204b5d9636..dabff9f7eb8 100644 --- a/libexec/ld.so/alpha/rtld_machine.c +++ b/libexec/ld.so/alpha/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.67 2019/08/06 04:01:41 guenther Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.68 2019/10/05 00:08:50 guenther Exp $ */ /* * Copyright (c) 1999 Dale Rahn @@ -78,11 +78,6 @@ _dl_md_reloc(elf_object_t *object, int rel, int relasz) for (i = 0; i < relrel; i++, relas++) { Elf_Addr *r_addr; -#ifdef DEBUG - if (ELF64_R_TYPE(relas->r_info) != R_TYPE(RELATIVE)) - _dl_die("RELACOUNT wrong"); -#endif - r_addr = (Elf64_Addr *)(relas->r_offset + loff); /* Handle unaligned RELATIVE relocs */ diff --git a/libexec/ld.so/amd64/rtld_machine.c b/libexec/ld.so/amd64/rtld_machine.c index 10b808c6c85..3b3fa1b88ac 100644 --- a/libexec/ld.so/amd64/rtld_machine.c +++ b/libexec/ld.so/amd64/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.33 2019/08/06 04:01:41 guenther Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.34 2019/10/05 00:08:50 guenther Exp $ */ /* * Copyright (c) 2002,2004 Dale Rahn @@ -194,10 +194,6 @@ _dl_md_reloc(elf_object_t *object, int rel, int relsz) for (i = 0; i < relrel; i++, rels++) { Elf_Addr *where; -#ifdef DEBUG - if (ELF_R_TYPE(rels->r_info) != R_TYPE(RELATIVE)) - _dl_die("RELACOUNT wrong"); -#endif where = (Elf_Addr *)(rels->r_offset + loff); *where = rels->r_addend + loff; } diff --git a/libexec/ld.so/arm/rtld_machine.c b/libexec/ld.so/arm/rtld_machine.c index 60f27505adb..70dc82df19a 100644 --- a/libexec/ld.so/arm/rtld_machine.c +++ b/libexec/ld.so/arm/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.30 2019/08/06 04:01:41 guenther Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.31 2019/10/05 00:08:50 guenther Exp $ */ /* * Copyright (c) 2004 Dale Rahn @@ -187,10 +187,6 @@ _dl_md_reloc(elf_object_t *object, int rel, int relsz) for (i = 0; i < relrel; i++, rels++) { Elf_Addr *where; -#ifdef DEBUG - if (ELF_R_TYPE(rels->r_info) != R_TYPE(RELATIVE)) - _dl_die("RELCOUNT wrong"); -#endif where = (Elf_Addr *)(rels->r_offset + loff); *where += loff; } diff --git a/libexec/ld.so/i386/rtld_machine.c b/libexec/ld.so/i386/rtld_machine.c index 3a3b441632e..0b2fd6e4ccd 100644 --- a/libexec/ld.so/i386/rtld_machine.c +++ b/libexec/ld.so/i386/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.41 2019/08/06 04:01:42 guenther Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.42 2019/10/05 00:08:50 guenther Exp $ */ /* * Copyright (c) 2002 Dale Rahn @@ -194,10 +194,6 @@ _dl_md_reloc(elf_object_t *object, int rel, int relsz) for (i = 0; i < relrel; i++, rels++) { Elf_Addr *where; -#ifdef DEBUG - if (ELF_R_TYPE(rels->r_info) != R_TYPE(RELATIVE)) - _dl_die("RELCOUNT wrong"); -#endif where = (Elf_Addr *)(rels->r_offset + loff); *where += loff; } diff --git a/libexec/ld.so/m88k/rtld_machine.c b/libexec/ld.so/m88k/rtld_machine.c index 71059a60a24..44822b272ae 100644 --- a/libexec/ld.so/m88k/rtld_machine.c +++ b/libexec/ld.so/m88k/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.26 2019/08/31 04:22:12 aoyama Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.27 2019/10/05 00:08:50 guenther Exp $ */ /* * Copyright (c) 2013 Miodrag Vallat. @@ -78,11 +78,6 @@ _dl_md_reloc(elf_object_t *object, int rel, int relasz) relas = (Elf32_Rela *)(object->Dyn.info[rel]); -#ifdef DL_PRINTF_DEBUG - _dl_printf("object relocation size %x, numrela %x\n", - object->Dyn.info[relasz], numrela); -#endif - if (relas == NULL) return(0); diff --git a/libexec/ld.so/powerpc/rtld_machine.c b/libexec/ld.so/powerpc/rtld_machine.c index 1e582f2d5e9..ea5f4a900cc 100644 --- a/libexec/ld.so/powerpc/rtld_machine.c +++ b/libexec/ld.so/powerpc/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.67 2019/08/06 04:01:42 guenther Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.68 2019/10/05 00:08:50 guenther Exp $ */ /* * Copyright (c) 1999 Dale Rahn @@ -69,11 +69,6 @@ _dl_md_reloc(elf_object_t *object, int rel, int relasz) relrel = rel == DT_RELA ? object->relacount : 0; relas = (Elf32_Rela *)(object->Dyn.info[rel]); -#ifdef DL_PRINTF_DEBUG -_dl_printf("object relocation size %x, numrela %x\n", - object->Dyn.info[relasz], numrela); -#endif - if (relas == NULL) return(0); @@ -86,18 +81,7 @@ _dl_printf("object relocation size %x, numrela %x\n", /* tight loop for leading RELATIVE relocs */ for (i = 0; i < relrel; i++, relas++) { Elf_Addr *r_addr; -#ifdef DEBUG - const Elf32_Sym *sym; - if (ELF32_R_TYPE(relas->r_info) != RELOC_RELATIVE) - _dl_die("RELCOUNT wrong"); - sym = object->dyn.symtab; - sym += ELF32_R_SYM(relas->r_info); - if (ELF32_ST_BIND(sym->st_info) != STB_LOCAL || - (ELF32_ST_TYPE(sym->st_info) != STT_SECTION && - ELF32_ST_TYPE(sym->st_info) != STT_NOTYPE)) - _dl_die("RELATIVE relocation against symbol"); -#endif r_addr = (Elf_Addr *)(relas->r_offset + loff); *r_addr = loff + relas->r_addend; } @@ -156,12 +140,6 @@ _dl_printf("object relocation size %x, numrela %x\n", (ELF32_ST_TYPE(sym->st_info) == STT_SECTION || ELF32_ST_TYPE(sym->st_info) == STT_NOTYPE) ) { *r_addr = loff + relas->r_addend; - -#ifdef DL_PRINTF_DEBUG -_dl_printf("rel1 r_addr %x val %x loff %x ooff %x addend %x\n", r_addr, - loff + relas->r_addend, loff, prev_ooff, relas->r_addend); -#endif - } else { *r_addr = loff + prev_value + relas->r_addend; @@ -249,22 +227,12 @@ _dl_printf("rel1 r_addr %x val %x loff %x ooff %x addend %x\n", r_addr, val &= ~0xffff0003; val |= (*r_addr & 0xffff0003); *r_addr = val; -#ifdef DL_PRINTF_DEBUG - _dl_printf("rel 14 %x val %x\n", r_addr, val); -#endif - _dl_dcbf(r_addr); } break; case RELOC_COPY: { struct sym_res sr; -#ifdef DL_PRINTF_DEBUG - _dl_printf("copy r_addr %x, sym %x [%s] size %d val %x\n", - r_addr, sym, symn, sym->st_size, - (prev_ooff + prev_value+ - relas->r_addend)); -#endif /* * we need to find a symbol, that is not in the current * object, start looking at the beginning of the list, @@ -275,10 +243,6 @@ _dl_printf("rel1 r_addr %x val %x loff %x ooff %x addend %x\n", r_addr, SYM_SEARCH_OTHER|SYM_WARNNOTFOUND| SYM_NOTPLT, sym, object); if (sr.sym != NULL) { -#ifdef DL_PRINTF_DEBUG -_dl_printf(" found other symbol at %x size %d\n", - sr.obj->obj_base + sr.sym->st_value, sr.sym->st_size); -#endif _dl_bcopy((void *)(sr.obj->obj_base + sr.sym->st_value), r_addr, sym->st_size); } else diff --git a/libexec/ld.so/sh/rtld_machine.c b/libexec/ld.so/sh/rtld_machine.c index d66e2824439..06a777588d0 100644 --- a/libexec/ld.so/sh/rtld_machine.c +++ b/libexec/ld.so/sh/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.29 2019/08/06 04:01:42 guenther Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.30 2019/10/05 00:08:50 guenther Exp $ */ /* * Copyright (c) 2004 Dale Rahn @@ -624,10 +624,6 @@ _dl_md_reloc(elf_object_t *object, int rel, int relasz) for (i = 0; i < relrel; i++, rels++) { Elf_Addr *where; -#ifdef DEBUG - if (ELF_R_TYPE(rels->r_info) != R_TYPE(RELATIVE)) - _dl_die("RELACOUNT wrong"); -#endif where = (Elf_Addr *)(rels->r_offset + loff); *where = rels->r_addend + loff; } diff --git a/libexec/ld.so/sparc64/rtld_machine.c b/libexec/ld.so/sparc64/rtld_machine.c index c47afb71856..3a467931f01 100644 --- a/libexec/ld.so/sparc64/rtld_machine.c +++ b/libexec/ld.so/sparc64/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.65 2019/08/06 04:01:42 guenther Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.66 2019/10/05 00:08:50 guenther Exp $ */ /* * Copyright (c) 1999 Dale Rahn @@ -231,10 +231,6 @@ _dl_md_reloc(elf_object_t *object, int rel, int relasz) for (i = 0; i < relrel; i++, relas++) { Elf_Addr *where; -#ifdef DEBUG - if (ELF_R_TYPE(relas->r_info) != R_TYPE(RELATIVE)) - _dl_die("RELACOUNT wrong"); -#endif where = (Elf_Addr *)(relas->r_offset + loff); *where = relas->r_addend + loff; } |