diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2017-10-10 04:49:11 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2017-10-10 04:49:11 +0000 |
commit | 185a842375b4d5d4995f0a290b0d9b482eeedf8f (patch) | |
tree | 24381ebb1a6dfb44b272abae196df73c7f556b01 /libexec | |
parent | eb25e3a3be14a55e11aa67b8c89341646216a38d (diff) |
__plt_{start,end} are no longer generated or necessary, having been
superseded by the generic ?WX and RELRO support. Stop trying to look
up and use them.
ok kettenis@ deraadt@
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ld.so/alpha/rtld_machine.c | 7 | ||||
-rw-r--r-- | libexec/ld.so/powerpc/rtld_machine.c | 6 | ||||
-rw-r--r-- | libexec/ld.so/sparc64/rtld_machine.c | 10 |
3 files changed, 3 insertions, 20 deletions
diff --git a/libexec/ld.so/alpha/rtld_machine.c b/libexec/ld.so/alpha/rtld_machine.c index 7fdcdb8039e..5d6d1ab2c9d 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.61 2017/02/16 13:31:10 deraadt Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.62 2017/10/10 04:49:10 guenther Exp $ */ /* * Copyright (c) 1999 Dale Rahn @@ -306,11 +306,6 @@ _dl_md_reloc_got(elf_object_t *object, int lazy) _dl_protect_segment(object, seg_start, "__got_start", "__got_end", PROT_READ); - /* mprotect the PLT, if it isn't already read-only */ - if (pltro == 0) - _dl_protect_segment(object, (Elf_Addr)pltgot, "__plt_start", - "__plt_end", PROT_READ|PROT_EXEC); - return (fails); } diff --git a/libexec/ld.so/powerpc/rtld_machine.c b/libexec/ld.so/powerpc/rtld_machine.c index 0086de269d1..191017dd5fa 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.62 2017/01/24 10:59:10 guenther Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.63 2017/10/10 04:49:10 guenther Exp $ */ /* * Copyright (c) 1999 Dale Rahn @@ -573,10 +573,6 @@ _dl_md_reloc_got(elf_object_t *object, int lazy) if (prot_exec != 0 && got_addr != NULL) _dl_syncicache(got_addr, 4); - /* mprotect the PLT */ - _dl_protect_segment(object, 0, "__plt_start", "__plt_end", - PROT_READ|prot_exec); - return (fails); } diff --git a/libexec/ld.so/sparc64/rtld_machine.c b/libexec/ld.so/sparc64/rtld_machine.c index 88ffdb43160..641f2f6f305 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.60 2017/08/28 14:06:22 deraadt Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.61 2017/10/10 04:49:10 guenther Exp $ */ /* * Copyright (c) 1999 Dale Rahn @@ -841,10 +841,6 @@ _dl_md_reloc_got(elf_object_t *object, int lazy) if (object->traced) lazy = 1; - /* temporarily make the PLT writable */ - _dl_protect_segment(object, 0, "__plt_start", "__plt_end", - PROT_READ|PROT_WRITE); - if (!lazy) { fails = _dl_md_reloc_all_plt(object); } else { @@ -857,9 +853,5 @@ _dl_md_reloc_got(elf_object_t *object, int lazy) /* mprotect the GOT */ _dl_protect_segment(object, 0, "__got_start", "__got_end", PROT_READ); - /* mprotect the PLT */ - _dl_protect_segment(object, 0, "__plt_start", "__plt_end", - PROT_READ|PROT_EXEC); - return (fails); } |