diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2004-05-24 20:16:13 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2004-05-24 20:16:13 +0000 |
commit | 6f87c994e188c5ccef743be390012f0dc3392e83 (patch) | |
tree | 80c189352073c3b3686bbec19bebb0085aaf923c | |
parent | 9d6daec549bf5305311f797a90baec7338ba9c88 (diff) |
Change define used to deal with PLT protection, use postive logic not negative.
ok mickey@
-rw-r--r-- | libexec/ld.so/alpha/archdep.h | 4 | ||||
-rw-r--r-- | libexec/ld.so/amd64/archdep.h | 4 | ||||
-rw-r--r-- | libexec/ld.so/arm/archdep.h | 4 | ||||
-rw-r--r-- | libexec/ld.so/i386/archdep.h | 4 | ||||
-rw-r--r-- | libexec/ld.so/loader.c | 6 | ||||
-rw-r--r-- | libexec/ld.so/mips/archdep.h | 4 | ||||
-rw-r--r-- | libexec/ld.so/powerpc/archdep.h | 4 | ||||
-rw-r--r-- | libexec/ld.so/sparc/archdep.h | 4 | ||||
-rw-r--r-- | libexec/ld.so/sparc64/archdep.h | 4 |
9 files changed, 21 insertions, 17 deletions
diff --git a/libexec/ld.so/alpha/archdep.h b/libexec/ld.so/alpha/archdep.h index 89db202c6d9..bae7963d977 100644 --- a/libexec/ld.so/alpha/archdep.h +++ b/libexec/ld.so/alpha/archdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: archdep.h,v 1.11 2003/07/09 21:01:10 drahn Exp $ */ +/* $OpenBSD: archdep.h,v 1.12 2004/05/24 20:16:12 drahn Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -41,6 +41,8 @@ #include "syscall.h" #include "util.h" +#define RTLD_PROTECT_PLT + static inline void RELOC_REL(Elf64_Rel *r, const Elf64_Sym *s, Elf64_Addr *p, unsigned long v) { diff --git a/libexec/ld.so/amd64/archdep.h b/libexec/ld.so/amd64/archdep.h index a3f14cf5215..21b156fe594 100644 --- a/libexec/ld.so/amd64/archdep.h +++ b/libexec/ld.so/amd64/archdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: archdep.h,v 1.2 2004/02/27 17:36:15 deraadt Exp $ */ +/* $OpenBSD: archdep.h,v 1.3 2004/05/24 20:16:12 drahn Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -42,8 +42,6 @@ #include "syscall.h" #include "util.h" -#define RTLD_TEXT_PLT - static inline void * _dl_mmap(void *addr, unsigned int len, unsigned int prot, unsigned int flags, int fd, off_t offset) diff --git a/libexec/ld.so/arm/archdep.h b/libexec/ld.so/arm/archdep.h index 30d72700b89..4f08415ceca 100644 --- a/libexec/ld.so/arm/archdep.h +++ b/libexec/ld.so/arm/archdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: archdep.h,v 1.2 2004/02/10 14:12:22 drahn Exp $ */ +/* $OpenBSD: archdep.h,v 1.3 2004/05/24 20:16:12 drahn Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -47,8 +47,6 @@ #define DT_BIND_NOW 0 #endif -#define RTLD_TEXT_PLT - /* * The following functions are declared inline so they can * be used before bootstrap linking has been finished. diff --git a/libexec/ld.so/i386/archdep.h b/libexec/ld.so/i386/archdep.h index dbe203e948d..3f5ca911982 100644 --- a/libexec/ld.so/i386/archdep.h +++ b/libexec/ld.so/i386/archdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: archdep.h,v 1.9 2004/02/10 14:12:22 drahn Exp $ */ +/* $OpenBSD: archdep.h,v 1.10 2004/05/24 20:16:12 drahn Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -36,8 +36,6 @@ #define RELTYPE Elf32_Rela #define RELSIZE sizeof(Elf32_Rela) -#define RTLD_TEXT_PLT - #include <sys/mman.h> #include <elf_abi.h> #include <machine/reloc.h> diff --git a/libexec/ld.so/loader.c b/libexec/ld.so/loader.c index 88e20cf13e2..fc07883d129 100644 --- a/libexec/ld.so/loader.c +++ b/libexec/ld.so/loader.c @@ -1,4 +1,4 @@ -/* $OpenBSD: loader.c,v 1.73 2004/02/23 20:47:39 drahn Exp $ */ +/* $OpenBSD: loader.c,v 1.74 2004/05/24 20:16:12 drahn Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -208,7 +208,7 @@ _dl_boot(const char **argv, char **envp, const long loff, long *dl_data) { extern char *__got_start; extern char *__got_end; -#ifndef RTLD_TEXT_PLT +#ifdef RTLD_PROTECT_PLT extern char *__plt_start; extern char *__plt_end; #endif @@ -218,7 +218,7 @@ _dl_boot(const char **argv, char **envp, const long loff, long *dl_data) ELF_TRUNC((long)&__got_start, _dl_pagesz), GOT_PERMS); -#ifndef RTLD_TEXT_PLT +#ifdef RTLD_PROTECT_PLT /* only for DATA_PLT or BSS_PLT */ _dl_mprotect((void *)ELF_TRUNC((long)&__plt_start, _dl_pagesz), ELF_ROUND((long)&__plt_end,_dl_pagesz) - diff --git a/libexec/ld.so/mips/archdep.h b/libexec/ld.so/mips/archdep.h index 4c0599c0be2..0a6529c4d89 100644 --- a/libexec/ld.so/mips/archdep.h +++ b/libexec/ld.so/mips/archdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: archdep.h,v 1.6 2003/06/09 16:10:04 deraadt Exp $ */ +/* $OpenBSD: archdep.h,v 1.7 2004/05/24 20:16:12 drahn Exp $ */ /* * Copyright (c) 1998-2002 Opsycon AB, Sweden. @@ -36,6 +36,8 @@ #include "resolve.h" #include "util.h" +#define RTLD_PROTECT_PLT + #define DL_MALLOC_ALIGN 4 /* Arch constraint or otherwise */ #define MACHID EM_MIPS /* ELF e_machine ID value checked */ diff --git a/libexec/ld.so/powerpc/archdep.h b/libexec/ld.so/powerpc/archdep.h index f4650b8b515..e0d5cd1f94b 100644 --- a/libexec/ld.so/powerpc/archdep.h +++ b/libexec/ld.so/powerpc/archdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: archdep.h,v 1.12 2003/06/09 16:10:04 deraadt Exp $ */ +/* $OpenBSD: archdep.h,v 1.13 2004/05/24 20:16:12 drahn Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -41,6 +41,8 @@ #include "syscall.h" #include "util.h" +#define RTLD_PROTECT_PLT + /* HACK */ #define DT_PROCNUM 0 #ifndef DT_BIND_NOW diff --git a/libexec/ld.so/sparc/archdep.h b/libexec/ld.so/sparc/archdep.h index 0894710114c..5b8bca11905 100644 --- a/libexec/ld.so/sparc/archdep.h +++ b/libexec/ld.so/sparc/archdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: archdep.h,v 1.7 2003/06/09 16:10:04 deraadt Exp $ */ +/* $OpenBSD: archdep.h,v 1.8 2004/05/24 20:16:12 drahn Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -43,6 +43,8 @@ #include "syscall.h" #include "util.h" +#define RTLD_PROTECT_PLT + static inline void * _dl_mmap(void *addr, unsigned int len, unsigned int prot, unsigned int flags, int fd, off_t offset) diff --git a/libexec/ld.so/sparc64/archdep.h b/libexec/ld.so/sparc64/archdep.h index b1664e0757a..86aa167e33d 100644 --- a/libexec/ld.so/sparc64/archdep.h +++ b/libexec/ld.so/sparc64/archdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: archdep.h,v 1.16 2003/06/09 16:10:04 deraadt Exp $ */ +/* $OpenBSD: archdep.h,v 1.17 2004/05/24 20:16:12 drahn Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -43,6 +43,8 @@ #include "syscall.h" #include "util.h" +#define RTLD_PROTECT_PLT + static inline void * _dl_mmap(void *addr, unsigned int len, unsigned int prot, unsigned int flags, int fd, off_t offset) |