From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94862 invoked by alias); 27 Feb 2018 13:08:10 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 94849 invoked by uid 89); 27 Feb 2018 13:08:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=competitive, H*i:sk:CADfbcE, H*f:sk:CADfbcE, won X-HELO: mail-lf0-f47.google.com Received: from mail-lf0-f47.google.com (HELO mail-lf0-f47.google.com) (209.85.215.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Feb 2018 13:08:07 +0000 Received: by mail-lf0-f47.google.com with SMTP id f75so22381185lfg.6 for ; Tue, 27 Feb 2018 05:08:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Fz+tg8/YsaG1qSDOTvNZTCxdWb1JuWKGqj89E4J0CXk=; b=bSh8XPOzB1gzMfNzhy+4ebLYSmqZX+wrQCmbejdq1kHcbjQgl/wTEb7OGsPhoLqdvX +KViFPqFVDXTeowVldMG5R3XdR6RHsSZfuboH4HkryDevoLQefY0QQAnlNqCYQjwpARG OgiTsMJ3cnx1d3DbZdiLVKivnUo/ylG19HCZ6Eg44ghMgE/DxrQgGsxeC1NkDmtnflHu yLygjr1Zaz4a9BGM2io+d5Np4S/syla0AyHoAv6PwkBOvYlFVneqBeaCGaLToJ/FitLM o4f2yEbvtksADXSgpxEC8ujmB4ViwwTyr/oOo0tgh+jTVD6B4dpow2IlA5V4zRUyM7Ui HBtw== X-Gm-Message-State: APf1xPAfVH2kAQZxRPiQa9O3g5xzdl1fG0TY3jSY5Xabh5XcYjt4Lik+ uJPxyAaI/2bYHlcHMh03a3iYc/Chvfkj0qYdR04= X-Google-Smtp-Source: AG47ELuhV1t0D7Wlpdp/7ry52gTJEYQZH/CxIg6POkcx7RXMg5Q7SSkc65TfkvDsxGXX8+NQsDSnoT+8Uld8rtRdCYA= X-Received: by 10.46.82.16 with SMTP id g16mr10027475ljb.67.1519736885530; Tue, 27 Feb 2018 05:08:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.46.18.208 with HTTP; Tue, 27 Feb 2018 05:08:05 -0800 (PST) In-Reply-To: References: From: Richard Biener Date: Tue, 27 Feb 2018 13:16:00 -0000 Message-ID: Subject: Re: GSoC To: Dushyant Pratap Singh Cc: GCC Development Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00231.txt.bz2 On Mon, Feb 26, 2018 at 5:35 PM, Dushyant Pratap Singh wrote: > Hello GCC community, > My name is Dushyant and I am interested in Gsoc at GCC .I am pursuing > Integrated B.Tech (Computer Science) and M.Tech (software engineering) fr= om > Gautam Buddha University, India. Currently I am in 4th year of the > programme. > > I have experience in Competitive Programming (primary language C++) and > have won and participated in many of the Algorithmic & Data Structures > competitions. > > Here is my Linkedin: > https://www.linkedin.com/in/dushyant-pratap-singh-044658128/ > > I have taken a course on Compiler Design in my last semester in which i > scored A+ grade. > > Project that i am most interested in is Textual Representation of LTO > Object Files. > > In my compiler lab I learned about the Compilation process how the > preproccessed files (.i file) ,assembly code (.s file) ,object code (.o > file) and finally executable file(a.out) were generated (as they were > temporary files they needed an extra GCC flag -save-temps to store > "temporary files" permanently) using gcc =E2=80=93Wall =E2=80=93save-temp= s prog1.c =E2=80=93o prog1 > . > > I have started to investigate on converting binary files to human readable > forms.It would be great if someone could explain how to get started with > the process. The suggested way was to handle things similar to the gcov tools -- piggy-b= ack on the existing {lto,tree}-streamer-in.c files, #ifdef'ing relevant parts s= o you can link them into a new lto-dump "driver" binary. To get started you might want to look at lto/lto-object.c and/or follow the lto1 binary when it processes its input files. Eventually integrating the dumping of a textual representation into the lto1 binary itself would also be feasible. Still the actual dumping should probably be intermangled with the binary reading code for ease of maintainance. Note the project isn't about providing a way of editing the textual representation and reading that back in but only for for inspection / debug= ging. There are several interesting pieces of information in the LTO IL so having a way to dump only parts with a specifyable level of detail is desirable (thus the suggestion to do this in a new binary rather than lto1). Thanks for the interest in this project! Richard. > Regards > > Dushyant Pratap Singh