Module Name: src Committed By: matt Date: Tue Feb 8 02:03:13 UTC 2011
Modified Files: src/lib/csu/common: crt0-common.c Log Message: Distinguish between a corrupt obj pointer and a null obj pointer. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/csu/common/crt0-common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/csu/common/crt0-common.c diff -u src/lib/csu/common/crt0-common.c:1.1 src/lib/csu/common/crt0-common.c:1.2 --- src/lib/csu/common/crt0-common.c:1.1 Sat Aug 7 18:01:33 2010 +++ src/lib/csu/common/crt0-common.c Tue Feb 8 02:03:13 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crt0-common.c,v 1.1 2010/08/07 18:01:33 joerg Exp $ */ +/* $NetBSD: crt0-common.c,v 1.2 2011/02/08 02:03:13 matt Exp $ */ /* * Copyright (c) 1998 Christos Zoulas @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: crt0-common.c,v 1.1 2010/08/07 18:01:33 joerg Exp $"); +__RCSID("$NetBSD: crt0-common.c,v 1.2 2011/02/08 02:03:13 matt Exp $"); #include <sys/types.h> #include <sys/syscall.h> @@ -105,7 +105,9 @@ __ps_strings = ps_strings; if (&_DYNAMIC != NULL) { - if ((obj == NULL) || (obj->magic != RTLD_MAGIC)) + if (obj == NULL) + _FATAL("NULL Obj_Entry pointer in GOT\n"); + if (obj->magic != RTLD_MAGIC) _FATAL("Corrupt Obj_Entry pointer in GOT\n"); if (obj->version != RTLD_VERSION) _FATAL("Dynamic linker version mismatch\n");