From owner-svn-src-all@FreeBSD.ORG Mon Aug 20 15:08:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4B3D1065673; Mon, 20 Aug 2012 15:08:22 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D5448FC1A; Mon, 20 Aug 2012 15:08:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KF8MxP051345; Mon, 20 Aug 2012 15:08:22 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KF8Mw1051343; Mon, 20 Aug 2012 15:08:22 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <201208201508.q7KF8Mw1051343@svn.freebsd.org> From: Alexander Kabaev Date: Mon, 20 Aug 2012 15:08:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239435 - stable/9/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: Mon, 20 Aug 2012 15:08:22 -0000 Author: kan Date: Mon Aug 20 15:08:22 2012 New Revision: 239435 URL: http://svn.freebsd.org/changeset/base/239435 Log: MFC r239019: Parse notes only after object structure had been allocated. Modified: stable/9/libexec/rtld-elf/map_object.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/map_object.c ============================================================================== --- stable/9/libexec/rtld-elf/map_object.c Mon Aug 20 15:05:29 2012 (r239434) +++ stable/9/libexec/rtld-elf/map_object.c Mon Aug 20 15:08:22 2012 (r239435) @@ -153,7 +153,6 @@ map_object(int fd, const char *path, con break; note_start = (Elf_Addr)(char *)hdr + phdr->p_offset; note_end = note_start + phdr->p_filesz; - digest_notes(obj, note_start, note_end); break; } @@ -291,7 +290,8 @@ map_object(int fd, const char *path, con obj->stack_flags = stack_flags; obj->relro_page = obj->relocbase + trunc_page(relro_page); obj->relro_size = round_page(relro_size); - + if (note_start < note_end) + digest_notes(obj, note_start, note_end); munmap(hdr, PAGE_SIZE); return (obj);