From owner-svn-src-stable@freebsd.org Wed May 3 02:19:46 2017 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 C231ED5A074; Wed, 3 May 2017 02:19:46 +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 906561F2B; Wed, 3 May 2017 02:19:46 +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 v432JjC8096806; Wed, 3 May 2017 02:19:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v432Jj9G096805; Wed, 3 May 2017 02:19:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705030219.v432Jj9G096805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 May 2017 02:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317719 - stable/11/contrib/elftoolchain/readelf X-SVN-Group: stable-11 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: Wed, 03 May 2017 02:19:46 -0000 Author: emaste Date: Wed May 3 02:19:45 2017 New Revision: 317719 URL: https://svnweb.freebsd.org/changeset/base/317719 Log: MFC r309679 (cem): readelf -S: Include zero index and match binutils' no-name Include the SHN_UNDEF (zero) index special section in extended-attribute ELF files, like GNU binutils' readelf. Additionally, print "" for sections without names, like GNU binutils. Modified: stable/11/contrib/elftoolchain/readelf/readelf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- stable/11/contrib/elftoolchain/readelf/readelf.c Wed May 3 02:12:45 2017 (r317718) +++ stable/11/contrib/elftoolchain/readelf/readelf.c Wed May 3 02:19:45 2017 (r317719) @@ -6643,13 +6643,14 @@ load_sections(struct readelf *re) } if ((name = elf_strptr(re->elf, shstrndx, sh.sh_name)) == NULL) { (void) elf_errno(); - name = "ERROR"; + name = ""; } if ((ndx = elf_ndxscn(scn)) == SHN_UNDEF) { - if ((elferr = elf_errno()) != 0) + if ((elferr = elf_errno()) != 0) { warnx("elf_ndxscn failed: %s", elf_errmsg(elferr)); - continue; + continue; + } } if (ndx >= re->shnum) { warnx("section index of '%s' out of range", name);