From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 6EA5E3858D20 for ; Mon, 9 Jan 2023 18:13:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6EA5E3858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 229E6207A2; Mon, 9 Jan 2023 18:13:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1673287991; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QhrMg4ECCaWUsHUaS6EPM/2m2PtV7aLWpZokaZPOHQA=; b=lPY4glBaTsmhLpqgdiRPdnY/7whkWSlMupuW6E/Q4llKbRkHhqqiYBIyQLII6tkiMqA6W+ OVch15hqpdTOd/curxH1ofEBhsVerQWgi81FO2Pi9HPvXElMvMhFuFcUnCXD77t+x/e8Q3 3iOJ9wmBM128bM71/hr0X0lbVySIHco= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1673287991; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QhrMg4ECCaWUsHUaS6EPM/2m2PtV7aLWpZokaZPOHQA=; b=mOkwRA22itU6ncYJIo7eX7VxuuuaCpocrIOZi4kvfcsJT/oPAjtWu8+Sv+t1BQ4lCQEMmQ l1lwDfnm/jJ6JpDw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1547713583; Mon, 9 Jan 2023 18:13:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ZMsiBTdZvGN/LQAAMHmgww (envelope-from ); Mon, 09 Jan 2023 18:13:11 +0000 From: Martin Jambor To: Mohamed Atef Cc: GCC Mailing List , Jan Hubicka Subject: Re: Bypass assembler when generating LTO object files In-Reply-To: References: User-Agent: Notmuch/0.37 (https://notmuchmail.org) Emacs/28.2 (x86_64-suse-linux-gnu) Date: Mon, 09 Jan 2023 19:13:10 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,SPF_HELO_NONE,SPF_SOFTFAIL,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello, On Sun, Dec 18 2022, Mohamed Atef wrote: > Hello, > I am interested in working in this project during my free time, is > understanding this https://gcc.gnu.org/wiki/LinkTimeOptimization > A good starting point That section of the Wiki is very old. You may find bits there that are still valid and relevant, but I would be actually a bit careful with that content. If you're looking for high-level overview of LTO, unfortunately I can only recommend videos: - Honza's "Building openSUSE with GCC's link time optimization" https://events.opensuse.org/conferences/oSC18/program/proposals/1846#2 - my "Interprodecural optimizations in GCC" https://www.youtube.com/watch?v=oQ71ZbOuSW4 (the first 12 minutes or so, the rest is then about optimizations) For the task specifically, the patch from 2014 https://gcc.gnu.org/legacy-ml/gcc/2014-09/msg00340.html is still a good starting point, even if not a very clear one. The crux of the matter is to enhance libiberty/simple-object*.[ch] to be able to create elf from scratch (as opposed to modifying an existing one). So look there too. If you have any questions, feel free to ask. Good luck, Martin