From owner-svn-src-stable@freebsd.org Thu Nov 24 00:46:36 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37ABEC51037; Thu, 24 Nov 2016 00:46:36 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06D229C1; Thu, 24 Nov 2016 00:46:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAO0kZw2040093; Thu, 24 Nov 2016 00:46:35 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAO0kZOl040092; Thu, 24 Nov 2016 00:46:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201611240046.uAO0kZOl040092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 24 Nov 2016 00:46:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r309077 - stable/10/usr.sbin/crunch/crunchide X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 00:46:36 -0000 Author: emaste Date: Thu Nov 24 00:46:34 2016 New Revision: 309077 URL: https://svnweb.freebsd.org/changeset/base/309077 Log: MFC r308772: crunchide: report explicit error for combined string table Some tools produce objects with a combined strtab and shstrtab. These objects are not supported by crunchide since it rewrites the symtab and strtab to "hide" symbols. This invalidates section header offsets into a combined strtab/shstrtab. In the future we could support these objects (by ensuring that we retain unmodified section name strings in the output .strtab, and then rewriting each section header's sh_name). Modified: stable/10/usr.sbin/crunch/crunchide/exec_elf32.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/crunch/crunchide/exec_elf32.c ============================================================================== --- stable/10/usr.sbin/crunch/crunchide/exec_elf32.c Thu Nov 24 00:45:52 2016 (r309076) +++ stable/10/usr.sbin/crunch/crunchide/exec_elf32.c Thu Nov 24 00:46:34 2016 (r309077) @@ -280,6 +280,10 @@ ELFNAMEEND(hide)(int fd, const char *fn) weird = 1; weirdreason = "section header string table does not exist"; } + if (strtabshdr == shstrtabshdr) { + weird = 1; + weirdreason = "combined strtab and shstrtab not supported"; + } if (weirdreason == NULL) weirdreason = "unsupported"; if (weird) {