Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp359663rwi; Wed, 26 Oct 2022 01:42:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5EhUaRKhgB+zG5nbKeL2PlG04goCxbKpRiypfErEMFfWq6x5BEujieUdgSEjImMAaubx8x X-Received: by 2002:a05:6402:2994:b0:453:4c5c:d31c with SMTP id eq20-20020a056402299400b004534c5cd31cmr40445334edb.412.1666773757364; Wed, 26 Oct 2022 01:42:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666773757; cv=none; d=google.com; s=arc-20160816; b=bE0FDxd6UojmTwb5ZKrUGobGMgdIp65wcBZA8JkQgF/P7v1qmFEoKPhieInEUOhW5K OsM5eJGnuqviHkDTfELXzgEwGIuE4UTd2/YWspunLzp7PcvCl3p9ONdHC8Du4jrR8M4A 5WQFQVoFkP5S/Z1MEDN8rebH3KosSPGzuFv6wI9ipVdYHyLUAmEdl7Se5rjWqzSjvNK7 icHOjqTO6m/MO0+UImJC/AhkrpK+lg3FmX5Cn34YIRogi8e6gpMw22Jbxj7M5WBFs8kG 0BQWbMNfue87D2K+6nnQs4YRHqiHR69IqT/SJywKCAc5L9R20uvMc6zpzFxU4U3bExpC ti9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id; bh=uv8qawsUmOo9AuZfM+lS+beTuCiP1fY4EhSrh4sMsbA=; b=wWlUMnFSn7YFuRstiVYOyum269bezY36UgT6UE9Xf5vB851/h97wJU0JQFuYa4AQWo fdkecFwU42y2SOM1lwKzSxDRrYqJaIZ1AljU2o8VisU1lX/yhzo4xmX0YLWafq6lBBZ0 TZXO60ZxYW3ApUwU4gAgB+DkM/TrUsxwzZAn/Twf94FZTsldEBITD4kRWCeJ37QfiRWN +of1FqsNWEQLYUg12nb82lBVCWGVJzVfIecIuRbOYpAC+OydSJUHZLSBqMMlZ8XOrVR7 FoiMH82YuDSWfuSbOwRXQqZeaNwV18rcHBGrIGbgjOM+9yFY7YPBXbRFTJCdRPX4M4iW cRfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds4-20020a170907724400b0077b83f3dc20si5964591ejc.63.2022.10.26.01.42.11; Wed, 26 Oct 2022 01:42:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232783AbiJZIfw (ORCPT + 99 others); Wed, 26 Oct 2022 04:35:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232201AbiJZIfu (ORCPT ); Wed, 26 Oct 2022 04:35:50 -0400 Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA62C495D9; Wed, 26 Oct 2022 01:35:49 -0700 (PDT) Received: by mail-ed1-f46.google.com with SMTP id x2so13019568edd.2; Wed, 26 Oct 2022 01:35:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uv8qawsUmOo9AuZfM+lS+beTuCiP1fY4EhSrh4sMsbA=; b=vPF7/tlggAM5jdGNkqDhR2dzXan+uocBI0LKT0KZvQNjCfcsvuLe+gsQiDYre9kEVS DUO4WNXTLm5C/+6byyOntdJp0+XPIvpt8bCw+bDwnDqbp2DWq5cco4ziv1/XpZtxontB P6hn0zRmJELO00fosmaNQCKkvRjo14mFZKvdCk6IYXKHKFRMoTJfiI+4iXTFRJ+bmC10 1PfyLS1M+QbdBPx2/oxwVW1c8zXPHy9Gxq7KUUc7Uis7RIiqFxrUaJXyvGeSyetjWwp6 G/pM+apoFi6kk5RTHhufVGqE1hnfQrcHTvqqCPT8aL57NAya313HfUGaXH/KOL0bwckt UYyA== X-Gm-Message-State: ACrzQf3w3H7h9XYL8ih5O/hTkbzK2E7CfAah4heaMVjKD4kpczWmGqhR Ka3MLD2++JRk2nqrua+y21D0LAi6nBoS7A== X-Received: by 2002:a05:6402:550c:b0:443:7d15:d57f with SMTP id fi12-20020a056402550c00b004437d15d57fmr40034782edb.147.1666773347643; Wed, 26 Oct 2022 01:35:47 -0700 (PDT) Received: from ?IPV6:2a0b:e7c0:0:107::70f? ([2a0b:e7c0:0:107::70f]) by smtp.gmail.com with ESMTPSA id k14-20020a170906158e00b0078bfff89de4sm2620566ejd.58.2022.10.26.01.35.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Oct 2022 01:35:47 -0700 (PDT) Message-ID: <2008526a-e0ca-7e67-cff6-b540d62e58c7@kernel.org> Date: Wed, 26 Oct 2022 10:35:45 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Content-Language: en-US To: Michael Matz Cc: Masahiro Yamada , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Nick Desaulniers , Nathan Chancellor , =?UTF-8?Q?Martin_Li=c5=a1ka?= , Borislav Petkov , Peter Zijlstra , Ard Biesheuvel References: <20220924181915.3251186-1-masahiroy@kernel.org> <20220924181915.3251186-7-masahiroy@kernel.org> From: Jiri Slaby Subject: Re: [PATCH v3 6/7] kbuild: use obj-y instead extra-y for objects placed at the head In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25. 10. 22, 14:26, Michael Matz wrote: >> Ideas, comments? I'll send the attachment as a PATCH later (if there are >> no better suggestions). > > This will work. An alternative way would be to explicitly name the input > file in the section commands, without renaming the section: > > @@ -126,6 +126,7 @@ SECTIONS > _text = .; > _stext = .; > /* bootstrapping code */ > + KEEP(vmlinux.a:head64.o(.head.text)) > HEAD_TEXT > TEXT_TEXT > > But I guess not all arch's name their must-be-first file head64.o (or even > have such requirement), so that's probably still arch-dependend and hence > not inherently better than your way. The downside of this is that it doesn't make sure the function (startup_64()) is the first one. When someone sticks something before it, it breaks again. But leaving the decision up to the x86 maintainers ;). Re. other archs, I have absolutely no idea (haven't looked into that at all). thanks, -- js