From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17805 invoked by alias); 29 Oct 2010 08:32:45 -0000 Received: (qmail 17788 invoked by uid 22791); 29 Oct 2010 08:32:44 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-wy0-f175.google.com (HELO mail-wy0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 29 Oct 2010 08:32:37 +0000 Received: by wya21 with SMTP id 21so2803198wya.20 for ; Fri, 29 Oct 2010 01:32:35 -0700 (PDT) Received: by 10.227.129.83 with SMTP id n19mr10631619wbs.33.1288341154911; Fri, 29 Oct 2010 01:32:34 -0700 (PDT) Received: from [192.168.2.99] (cpc2-cmbg8-0-0-cust61.5-4.cable.virginmedia.com [82.6.108.62]) by mx.google.com with ESMTPS id b30sm1814935wbb.4.2010.10.29.01.32.32 (version=SSLv3 cipher=RC4-MD5); Fri, 29 Oct 2010 01:32:32 -0700 (PDT) Message-ID: <4CCA8C22.8030308@gmail.com> Date: Fri, 29 Oct 2010 13:19:00 -0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Ian Lance Taylor CC: Andi Kleen , Andrew Pinski , Mark Mitchell , gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: Discussion about merging Go frontend References: <4CC45302.9000702@gmail.com> <4CC59F1E.7040505@codesourcery.com> <87pquy3yh5.fsf@basil.nowhere.org> <4CC60C5E.6050605@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-10/txt/msg02478.txt.bz2 On 29/10/2010 02:31, Ian Lance Taylor wrote: > Dave Korn >> What would be even nicer would be if we could share the same code-reader >> interface between lto and go (and the lto-plugin), thereby getting object >> format independence equally everywhere for no extra cost. > > How about this? That looks excellent, thank you! > This implements an object file reader/writer which does everything > required by LTO and gccgo. The ELF code works. I have not tested the > Mach-O and COFF code at all beyond compiling it; I hope that somebody > else can test those targets and fix them. I'm right here :) Can't help with Darwin but hopefully Jack/Iain will be available. > With this patch, libelf is no longer needed. > > I've bootstrapped this on x86_64-unknown-linux-gnu, and I've run the LTO > testsuite. > > This patch puts the code in libiberty, but it could equally well go in > gcc. Anybody want to make an argument one way or another? Libiberty is better for sharing with lto-plugin, I think. I sent a patch that commoned out some of the COFF-reader code into gcc/, but I only put it there because it was a single header file with no associated object file. Now there's actual code to be linked in, I think libiberty is a better choice than lto-plugin trying to share .o files from the ../gcc/ objdir. > Does the general interface look OK? > > This patch requires approval from the LTO maintainers. Also, I have a patch outstanding to COFF-ize the lto-plugin(*), so if we can get an early "OK in principle" I'll get cracking on respinning it to use this new interface. cheers, DaveK -- (*) - http://gcc.gnu.org/ml/gcc-patches/2010-10/msg02176.html