summaryrefslogtreecommitdiff
path: root/libexec/ld.so/i386/rtld_machine.c
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2002-11-13 21:19:07 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2002-11-13 21:19:07 +0000
commit1d1d3e4c6229a01fcb26d2c084f94b587825faed (patch)
tree14e7a92b0ba0e3bd3f84f68ac3e82b388960269e /libexec/ld.so/i386/rtld_machine.c
parent00b27da2e128d0b354a36eca4cc76f2feca6f175 (diff)
Check for NULL on pltgot, appearently libraries with no external references
will not create a PLT on i386.
Diffstat (limited to 'libexec/ld.so/i386/rtld_machine.c')
-rw-r--r--libexec/ld.so/i386/rtld_machine.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libexec/ld.so/i386/rtld_machine.c b/libexec/ld.so/i386/rtld_machine.c
index 5740973495f..b207ae8d538 100644
--- a/libexec/ld.so/i386/rtld_machine.c
+++ b/libexec/ld.so/i386/rtld_machine.c
@@ -318,6 +318,9 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
Elf_Rel *rel;
struct load_list *llist;
+ if (pltgot == NULL)
+ return; /* it is possible to have no PLT/GOT relocations */
+
pltgot[1] = (Elf_Addr)object;
pltgot[2] = (Elf_Addr)&_dl_bind_start;