From owner-freebsd-hackers@freebsd.org Wed May 4 13:23:22 2016 Return-Path: Delivered-To: freebsd-hackers@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 2A8A0B2BB7C for ; Wed, 4 May 2016 13:23:22 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB04F1E10 for ; Wed, 4 May 2016 13:23:21 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x244.google.com with SMTP id u185so6685591iod.2 for ; Wed, 04 May 2016 06:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=1PIu0k+10Bgjlk7vk4iyW/E6/PHJp9kqI5FYjinrzAE=; b=izMOYa8/5ffTohL+2NL+Ms7289S2+Yh+UfLHENtLISnc+ns7ZfSjmTZ3VQQfQzzaeO liWpf4xvXgNWk3Cn+lSnQXFbIzkOPgmtelTGs/3tqH8V3j0vvaia8I/u5l8vhoJGJqV1 UTWvbRM9itGgNYwcLt0gJaHi6iEaYdl2tySdOrfd7jl++gs6upW5P9liRd8hZyNY588D OBWTTzdtKMAKO0fnL6bReixI9zi7zT7h++AKPIPsanDtxUC/kX+UWBci/l5en76u11Oz g8XX6NO4FPAMVqKCJTGCFBg13U4DpF7bZ5YmiQbqeCXjiGFNQ4li9KjbY9BLlwzmlWgP r2CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=1PIu0k+10Bgjlk7vk4iyW/E6/PHJp9kqI5FYjinrzAE=; b=VaRUgAAJTA8Uaqrtfjxbda/Y1nKUK29H8+G1zHHC51o96xfOWDGhBF71Xq/xGN41Lz 8/HiiCT8Oujtr+3NznkyjI009kd+qfbxOaqBvSQRB9nZlRzOf+y8QIGWhp2EMS+aAI/S Dt4d0C8GIeSF/iCOdjgpHEVRF6+Pqqa1NNkRo/GUCukPeNkyCj51xiDG0aqyX7WnmSNU YxTEGVuyvtzc9LKf2GGs/mQ4r/bCEYry9NbkrZzuRNfuAztzS7LZJxjULXHt5Pf7yv03 gmxl+fBatD//LIl8OBYjgYcUHakrB4aM6bPwB/byfBmryAiFG6UPaFwckjfHyLrebXmD hnrg== X-Gm-Message-State: AOPr4FX6gt1p2jecG3dljS7ZOzRxbAb127sbPeGBGFuoHbq5aP/+5AEZbHgK2XFpYgAyCb8iwH1PQuaCOzlevw== X-Received: by 10.107.147.138 with SMTP id v132mr9900506iod.38.1462368201343; Wed, 04 May 2016 06:23:21 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.27.197 with HTTP; Wed, 4 May 2016 06:23:01 -0700 (PDT) In-Reply-To: <65BAB92F-271C-489F-A804-6496B4953599@metricspace.net> References: <65BAB92F-271C-489F-A804-6496B4953599@metricspace.net> From: Ed Maste Date: Wed, 4 May 2016 09:23:01 -0400 X-Google-Sender-Auth: wGLLERBzOZ661E7_XCkGudpvE3I Message-ID: Subject: Re: Problem with objcopy corrupting section names To: Eric McCorkle Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2016 13:23:22 -0000 On 2 May 2016 at 18:25, Eric McCorkle wrote: > > I've run into a weird problem where the section names are seemingly being corrupted for boot1. The process to reproduce this should be simple: just build boot1 and then do objdump -x boot1.efi and you should see that the section names are corrupted. This could well be a bug in elfcopy's libpe - it's a new addition to the ELF Tool Chain project, and I have not tested it extensively outside of the plain boot1.efi and loader.efi. To confirm my understanding, this happens with your patched tree, but not stock FreeBSD? Also, in what way are they corrupted? It's expected that section will be truncated, as the COFF format only supports char[8] for the name. If you mail me (off-list) a copy of boot1.sym I'll take a look.