From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 43F453858D3C for ; Wed, 1 Mar 2023 13:41:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 43F453858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677678088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K2pSIgYJ2PBQPOTeYVaK/BLrUKz5XPTgYvMF31b8tLo=; b=TxegyERuuHdKJS+FERRmU2omB+7yCje/4f1ODSbvSqtrJZg2wIXRvaIlf9wFry+fxkJvBl 8s7NhzZ7ThI/Zaw8CW1Esh3YxMbOyaNxcPGdZdjKTqk2KN8nywumjl8ulysHMUulbLp78k 0olpp9y6hdV0mLenxB4Jdb+FfiNLi/U= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-575-uP8zYtjhMCeFtl2nP3WVoQ-1; Wed, 01 Mar 2023 08:41:26 -0500 X-MC-Unique: uP8zYtjhMCeFtl2nP3WVoQ-1 Received: by mail-qv1-f71.google.com with SMTP id jh21-20020a0562141fd500b0053c23b938a0so7019177qvb.17 for ; Wed, 01 Mar 2023 05:41:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677678085; h=content-transfer-encoding:in-reply-to:subject:from:content-language :references:to:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=K2pSIgYJ2PBQPOTeYVaK/BLrUKz5XPTgYvMF31b8tLo=; b=AHMRM736dqSuST66bVKOJH8Bt3SHbY7ujgm/uR7c4TxaqIi/kJSiSkc22aRSaif7dr MUbOV+0YPC2TlPffQJ3AckiMP+MkTNFx2DZWTFvUcm0u+YROCHdIP9U9uY7qtHfgYlp9 8IRTSh3Wgls+UiWfY0sUaybQb3Et8J2g10U3b5XAuZsgQRSoyZa4hsAcNpK9m/z3WHMR trb4X3dm2xe6Ly6Hwy5gI1nlAKyJbmQT3BhqKzZCs//T9kqBeg6xETHO8LmO9Ri/z7fI gitHBv2c3JDPvhMlsdNaHOE9vJa4gVmGS5Q4AyymjyJdw4j5kp94fUtRJuWc38QhMjVp jskA== X-Gm-Message-State: AO0yUKVtPWzD0ljN5xjI6k5csFq/RPPTupiiu15XFYqPCDraIUEvu4HY lbiwnheuJZZiBr8GdL5oAWxw2bSB3biOzx/gYemJ5XPImhhvIt816tWeDXEnzEfvrb4qiTANAMX lIMliXYSElqKeyCp5F7fYnWo= X-Received: by 2002:a05:6214:20ee:b0:56e:b347:8df4 with SMTP id 14-20020a05621420ee00b0056eb3478df4mr11788190qvk.11.1677678085699; Wed, 01 Mar 2023 05:41:25 -0800 (PST) X-Google-Smtp-Source: AK7set8w4MNCKfYKliputQORGtlzAu1/6hBqX7QLlVs5ZlgKVRb7IdPfB1fP9NGnLRVrLVCf/2x1yA== X-Received: by 2002:a05:6214:20ee:b0:56e:b347:8df4 with SMTP id 14-20020a05621420ee00b0056eb3478df4mr11788171qvk.11.1677678085444; Wed, 01 Mar 2023 05:41:25 -0800 (PST) Received: from [192.168.1.18] ([79.123.86.193]) by smtp.gmail.com with ESMTPSA id j3-20020a378703000000b00742bc037f29sm4789630qkd.120.2023.03.01.05.41.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Mar 2023 05:41:24 -0800 (PST) Message-ID: <3ef565e0-011e-1ffd-cac6-04aa8f371537@redhat.com> Date: Wed, 1 Mar 2023 13:41:22 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 To: Tom Kacvinsky , Binutils References: From: Nick Clifton Subject: Re: request for enhancement in BFD and gold linkers in regards to .comment section In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-GB Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Tom, > I have noticed that the LLVM linker will add something to the .comment > section of binaries it produces for the version of lld used to produce an > ELF executable or shared library. Does it ? I do not see this: % clang hello.c % readelf -p.comment a.out String dump of section '.comment': [ 0] GCC: (GNU) 12.2.1 20221121 (Red Hat 12.2.1-4) [ 2e] GCC: (GNU) 12.0.1 20220413 (Red Hat 12.0.1-0) [ 5c] clang version 14.0.5 (Fedora 14.0.5-2.fc36) So there is a note for the version of Clang, but not one for the version of lld. Maybe this is a new feature ? I am using clang/llvm/lld version 14.0.5. > For the gold liker, I see I can do a readelf -p .note.gnu.gold-version and > get the version of gold used to make an ELF file. Again I do not see this: % gcc hello.c -fuse-ld=gold % readelf -p.comment a.out String dump of section '.comment': [ 1] GCC: (GNU) 12.2.1 20221121 (Red Hat 12.2.1-4) [ 2f] GCC: (GNU) 12.0.1 20220413 (Red Hat 12.0.1-0) > I see nothing similar for the BFD linker. True - this feature is not currently supported. > So the request for enhancement is to add something to the .comment section > as to which version of the BFD or gold linker was used to produce the ELF. > > I can file a BZ if that is the preferred way of receiving a request such as > this. It is, so please do file a BZ. If you can include a reproducer that would help. Cheers Nick