From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by sourceware.org (Postfix) with ESMTPS id 2076C3857C49 for ; Thu, 17 Sep 2020 06:08:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2076C3857C49 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=maskray.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=emacsray@gmail.com Received: by mail-pj1-f47.google.com with SMTP id md22so2361701pjb.0 for ; Wed, 16 Sep 2020 23:08:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=hbDcreWZqL0fHH6Fdl1QUvVitukyDMlJM/+Bd+WL0l4=; b=PzF/TuX/XK9akFm/h57QDNzCefu8mQLrUsOMpGDL9EQEDnqf0LxLtA1dzP19KVK+nS BPSy4IYeJK7D3yUEzGXgXbM7o6r3o1Gch0uexKpcXUdj7u0p3qpI0leZ1H1aOBMSEn2t DMzk6ymWN2SzNFjgNYvsTcDxURCEnwIQDx8CeQ4DDEDummGnK1q88RNQNCcprXdbalVf GAGsu/En1CrEyCP35ot82zFdhiJnhG9Es9i4zwqb4OyOmhUE0yvYW0gfR3YZK9lCgnR+ BTm1nT11rMvMFm1i9808v74VQHja/kS6e6PzDCPUTWLacdu/y7Gc44oM6EOfWIR75Mo7 p2NQ== X-Gm-Message-State: AOAM532hFjvP331QvQil46fRT8hT72+rLN6Ebty2qoJVYkgEwWyi7cG1 lbSa0bGbQlFqbdQ8XKQcLADIPhKqrR6EBA== X-Google-Smtp-Source: ABdhPJzyX+E2xkeEatGPHCq5h4FPBl2KNfcd8D0mLB0AxT/5K9bE49UODIpnYSWCRO4PCk0zZYLdFA== X-Received: by 2002:a17:902:8347:b029:d1:f365:6fb5 with SMTP id z7-20020a1709028347b02900d1f3656fb5mr4734928pln.61.1600322904017; Wed, 16 Sep 2020 23:08:24 -0700 (PDT) Received: from localhost ([2601:647:4b01:ae80::51fb]) by smtp.gmail.com with ESMTPSA id l9sm18080763pgg.29.2020.09.16.23.08.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Sep 2020 23:08:23 -0700 (PDT) Date: Wed, 16 Sep 2020 23:08:22 -0700 From: Fangrui Song To: binutils@sourceware.org Subject: ld: extensions to the internal linker script Message-ID: <20200917060822.f57tyn6eb3xmr4ph@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Sep 2020 06:08:26 -0000 Hi, I filed a ticket about potential syntax for extending the internal linker script (providing some SECTIONS fragments instead of the full external linker script): https://sourceware.org/bugzilla/show_bug.cgi?id=26404 I am curious about your thoughts and suggested syntax on the feature. IIUC, GCC wants to introduce some call graph profiling (ipa-reorder) features. If such an extension exists, users don't have to upgrade binutils to have *(SORT(.text.sorted.*)) in the output section .text GCC can provide such a linker script with such a SECTIONS fragment.