Date: Wed, 3 May 2017 02:19:45 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> 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 Message-ID: <201705030219.v432Jj9G096805@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 "<no-name>" 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 = "<no-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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705030219.v432Jj9G096805>