From owner-svn-src-all@FreeBSD.ORG Fri Apr 10 09:52:43 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C0B21065676; Fri, 10 Apr 2009 09:52:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A36B8FC1E; Fri, 10 Apr 2009 09:52:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3A9qh3c038414; Fri, 10 Apr 2009 09:52:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3A9qhFg038413; Fri, 10 Apr 2009 09:52:43 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200904100952.n3A9qhFg038413@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 10 Apr 2009 09:52:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190883 - head/libexec/rtld-elf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2009 09:52:44 -0000 Author: kib Date: Fri Apr 10 09:52:42 2009 New Revision: 190883 URL: http://svn.freebsd.org/changeset/base/190883 Log: Update comment to the reality, rtld supports any number of loadable segments. Fix spacing. Reviewed by: kan Modified: head/libexec/rtld-elf/map_object.c Modified: head/libexec/rtld-elf/map_object.c ============================================================================== --- head/libexec/rtld-elf/map_object.c Fri Apr 10 09:13:58 2009 (r190882) +++ head/libexec/rtld-elf/map_object.c Fri Apr 10 09:52:42 2009 (r190883) @@ -91,8 +91,7 @@ map_object(int fd, const char *path, con /* * Scan the program header entries, and save key information. * - * We rely on there being exactly two load segments, text and data, - * in that order. + * We expect that the loadable segments are ordered by load address. */ phdr = (Elf_Phdr *) ((char *)hdr + hdr->e_phoff); phsize = hdr->e_phnum * sizeof (phdr[0]); @@ -167,7 +166,7 @@ map_object(int fd, const char *path, con return NULL; } - for (i = 0; i <= nsegs; i++) { + for (i = 0; i <= nsegs; i++) { /* Overlay the segment onto the proper region. */ data_offset = trunc_page(segs[i]->p_offset); data_vaddr = trunc_page(segs[i]->p_vaddr);