diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2003-09-04 19:37:09 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2003-09-04 19:37:09 +0000 |
commit | 728366afbd8a31bc70424bf0b64579cdfef0a2a1 (patch) | |
tree | 70ef6cf6f9085f1c8fcb25356e371013e4d87d1e /libexec/ld.so/sparc64/rtld_machine.c | |
parent | 29153d4f5d5ce3630a02cc3cf4cf730b0a5ead11 (diff) |
Fix W^X mistake. If the dynamic linker is workin in non-lazy mode, it
should still mprotect the GOT and PLT as appropriate. ok deraadt@ miod@
Diffstat (limited to 'libexec/ld.so/sparc64/rtld_machine.c')
-rw-r--r-- | libexec/ld.so/sparc64/rtld_machine.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/libexec/ld.so/sparc64/rtld_machine.c b/libexec/ld.so/sparc64/rtld_machine.c index 9e4fa21efed..e2d6e6a183a 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.30 2003/09/04 19:33:50 drahn Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.31 2003/09/04 19:37:08 drahn Exp $ */ /* * Copyright (c) 1999 Dale Rahn @@ -748,14 +748,12 @@ _dl_md_reloc_got(elf_object_t *object, int lazy) if (!lazy) { _dl_md_reloc(object, DT_JMPREL, DT_PLTRELSZ); - return; - } - - _dl_install_plt(&entry[0], (Elf_Addr)&_dl_bind_start_0); - _dl_install_plt(&entry[8], (Elf_Addr)&_dl_bind_start_1); - - pltgot[8] = (Elf_Addr)object; + } else { + _dl_install_plt(&entry[0], (Elf_Addr)&_dl_bind_start_0); + _dl_install_plt(&entry[8], (Elf_Addr)&_dl_bind_start_1); + pltgot[8] = (Elf_Addr)object; + } if (object->got_size != 0) _dl_mprotect((void*)object->got_addr, object->got_size, PROT_READ); |