Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Nov 2016 00:46:35 +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-10@freebsd.org
Subject:   svn commit: r309077 - stable/10/usr.sbin/crunch/crunchide
Message-ID:  <201611240046.uAO0kZOl040092@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611240046.uAO0kZOl040092>