Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Apr 2012 08:56:29 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r233832 - stable/9/libexec/rtld-elf
Message-ID:  <201204030856.q338uTjm040744@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Tue Apr  3 08:56:29 2012
New Revision: 233832
URL: http://svn.freebsd.org/changeset/base/233832

Log:
  MFC r233546:
  Prevent rtld_verify_object_versions() from being called several times
  for the same object.

Modified:
  stable/9/libexec/rtld-elf/rtld.c
  stable/9/libexec/rtld-elf/rtld.h
Directory Properties:
  stable/9/libexec/rtld-elf/   (props changed)

Modified: stable/9/libexec/rtld-elf/rtld.c
==============================================================================
--- stable/9/libexec/rtld-elf/rtld.c	Tue Apr  3 08:54:35 2012	(r233831)
+++ stable/9/libexec/rtld-elf/rtld.c	Tue Apr  3 08:56:29 2012	(r233832)
@@ -4163,6 +4163,10 @@ rtld_verify_object_versions(Obj_Entry *o
     const Obj_Entry *depobj;
     int maxvernum, vernum;
 
+    if (obj->ver_checked)
+	return (0);
+    obj->ver_checked = true;
+
     maxvernum = 0;
     /*
      * Walk over defined and required version records and figure out

Modified: stable/9/libexec/rtld-elf/rtld.h
==============================================================================
--- stable/9/libexec/rtld-elf/rtld.h	Tue Apr  3 08:54:35 2012	(r233831)
+++ stable/9/libexec/rtld-elf/rtld.h	Tue Apr  3 08:56:29 2012	(r233832)
@@ -230,6 +230,7 @@ typedef struct Struct_Obj_Entry {
     bool mainprog : 1;		/* True if this is the main program */
     bool rtld : 1;		/* True if this is the dynamic linker */
     bool relocated : 1;		/* True if processed by relocate_objects() */
+    bool ver_checked : 1;	/* True if processed by rtld_verify_object_versions */
     bool textrel : 1;		/* True if there are relocations to text seg */
     bool symbolic : 1;		/* True if generated with "-Bsymbolic" */
     bool bind_now : 1;		/* True if all relocations should be made first */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204030856.q338uTjm040744>