diff options
-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 |
3 files changed, 9 insertions, 5 deletions
diff --git a/libexec/ld.so/arm/archdep.h b/libexec/ld.so/arm/archdep.h index 4babebe6b33..30d72700b89 100644 --- a/libexec/ld.so/arm/archdep.h +++ b/libexec/ld.so/arm/archdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: archdep.h,v 1.1 2004/02/07 06:00:49 drahn Exp $ */ +/* $OpenBSD: archdep.h,v 1.2 2004/02/10 14:12:22 drahn Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -47,6 +47,8 @@ #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 de4128e4ae8..dbe203e948d 100644 --- a/libexec/ld.so/i386/archdep.h +++ b/libexec/ld.so/i386/archdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: archdep.h,v 1.8 2003/06/09 16:10:03 deraadt Exp $ */ +/* $OpenBSD: archdep.h,v 1.9 2004/02/10 14:12:22 drahn Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -36,6 +36,8 @@ #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 f5b70df104d..1b886448504 100644 --- a/libexec/ld.so/loader.c +++ b/libexec/ld.so/loader.c @@ -1,4 +1,4 @@ -/* $OpenBSD: loader.c,v 1.71 2004/02/07 06:00:48 drahn Exp $ */ +/* $OpenBSD: loader.c,v 1.72 2004/02/10 14:12:22 drahn Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -205,7 +205,7 @@ _dl_boot(const char **argv, char **envp, const long loff, long *dl_data) { extern char *__got_start; extern char *__got_end; -#if !defined(__i386__) && !defined(__arm__) +#ifndef RTLD_TEXT_PLT extern char *__plt_start; extern char *__plt_end; #endif @@ -215,7 +215,7 @@ _dl_boot(const char **argv, char **envp, const long loff, long *dl_data) ELF_TRUNC((long)&__got_start, _dl_pagesz), GOT_PERMS); -#if !defined(__i386__) && !defined(__arm__) +#ifndef RTLD_TEXT_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) - |