From owner-freebsd-toolchain@FreeBSD.ORG Fri Jan 16 16:29:46 2015 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C40DD18 for ; Fri, 16 Jan 2015 16:29:46 +0000 (UTC) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [IPv6:2001:4f8:3:ffe0:406a:0:50:2]) (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 101D59A3 for ; Fri, 16 Jan 2015 16:29:46 +0000 (UTC) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [127.0.1.5]) by phabric-backend.isc.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GGTjAc068514 for ; Fri, 16 Jan 2015 16:29:45 GMT (envelope-from gjb@phabric-backend.isc.freebsd.org) Received: (from root@localhost) by phabric-backend.isc.freebsd.org (8.14.9/8.14.9/Submit) id t0GGTjLX068513; Fri, 16 Jan 2015 16:29:45 GMT (envelope-from gjb) Date: Fri, 16 Jan 2015 16:29:45 +0000 To: freebsd-toolchain@freebsd.org From: "emaste (Ed Maste)" Subject: [Differential] [Request, 3 lines] D1543: crunchide: Correct 64-bit section header offset Message-ID: X-Priority: 3 Thread-Topic: D1543: crunchide: Correct 64-bit section header offset X-Herald-Rules: none X-Phabricator-To: X-Phabricator-Cc: Thread-Index: MzBlN2E5ZWU4ZjFhZTAwNGYwMTY5M2RlZTIx X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , , MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 16:29:46 -0000 emaste created this revision. emaste added a subscriber: freebsd-toolchain. REVISION SUMMARY For 64-bit binaries the Elf_Ehdr e_shoff is at offset 40, not 44. Instead of using an incorrect hardcoded offset, let the compiler figure it out for us with offsetof(). REVISION DETAIL https://reviews.freebsd.org/D1543 AFFECTED FILES usr.sbin/crunch/crunchide/exec_elf32.c To: emaste Cc: freebsd-toolchain