From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id 7878E3851C0A for ; Fri, 27 May 2022 17:28:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7878E3851C0A Received: by mail-wm1-x329.google.com with SMTP id y24so2998339wmq.5 for ; Fri, 27 May 2022 10:28:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=14yZDuvhZAcZpFoNwHb8QzO1G/O4M9wis+oR9u+ljlo=; b=HOBiqW78Lx3t9QPPugSJupwnTPqx63AunucD7KFWyHjXsQ8goVFf7IGlv0TV1K90cG 93dp56ZXRYgO+6ECSo+Zz1bW0DjT3jlVbwRvz1tdf3a0UGHfBY75CnsK7K4lqnjm5O/w yVy4u7pETBTbLa0/Vlbl2IQUITT/Ezed4mSpMjA9qWx+a/N9WfbJaeZRllLOPrcKxOON /u18DINEtKhYuPuLzEU16XkWF+8UMCuQNxCbcy003mIzPWP+kMB1Yc5j8URGbgnzRquc m6s95yWonrtP0SwWK8XTgDFtMguNNQ7kh0l6YTVo6C5VC85Pl8zYgMwgtqrIamtc9pNj xy5g== X-Gm-Message-State: AOAM533vJK0cQeETkpK2rcyDszzFB3UC/m2AJ/7vACpm0OYTLfgx7CFJ fKhxB/c5gKRE/KJpzgp4nJg5VpPahMMx60RO4nH7hDuD0WyvaA== X-Google-Smtp-Source: ABdhPJwUw7Do40dm6F1tiodbjZSfz3kWvBx+xqMT5DWadOE4KNy/YLIFC4LMvn1iz1/T7Jxn6hAdEwISWeTybFFPyBA= X-Received: by 2002:a7b:cd0b:0:b0:397:49cf:2ef0 with SMTP id f11-20020a7bcd0b000000b0039749cf2ef0mr8085987wmj.156.1653672515104; Fri, 27 May 2022 10:28:35 -0700 (PDT) MIME-Version: 1.0 References: <20220525064252.58603-1-ishitatsuyuki@gmail.com> <20220525064252.58603-2-ishitatsuyuki@gmail.com> <58544e0c-4913-a6fd-0395-191e8f854eda@suse.com> <3f0bff74-1a37-e370-d3a4-c591db3b096a@suse.com> In-Reply-To: From: Peter Collingbourne Date: Fri, 27 May 2022 10:28:23 -0700 Message-ID: Subject: Re: [PATCH 1/4] elf: Add definition for SHT_LLVM_ADDRSIG. To: Tatsuyuki Ishi Cc: Jan Beulich , Binutils Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-19.9 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Fri, 27 May 2022 17:28:39 -0000 On Thu, May 26, 2022 at 3:37 AM Tatsuyuki Ishi via Binutils wrote: > > > Values in [..._LOOS,..._HIOS] pertain to particular OSes (i.e. > > ELFOSABI_* values in the header). LLVM isn't really an OS by itself > > (and I'm also unaware of ELFOSABI_LLVM existing), so I expect there > > are certain ELFOSABI_* values to which SHT_LLVM_* apply. Otherwise > > how are collisions with other OSes' SHT__... values avoided? > > I'm not a LLVM contributor, but unfortunately it seems like the answer > is that they do not follow the practice of constraining these values > based on EI_OSABI, and they are basically treated as same as non-OS > specific values [1]. > > [1] https://github.com/llvm/llvm-project/blob/09c2b7c35af8c4bad39f03e9f60df8bd07323028/llvm/lib/Object/ELF.cpp#L232-L307 Hi, The LLVM section types are in a carveout of the GNU OSABI range, as previously agreed on the GNU gABI list: https://sourceware.org/pipermail/gnu-gabi/2017q1/000157.html If other OSs want to adopt the LLVM section types, they will need to create the same carveout in their OSABI. >From the GNU binutils perspective, I think these should be treated the same as the SHT_GNU_* section types. I'm not sure of the reason why the LLVM ELF parser doesn't consider the OSABI for the GNU/LLVM section types, but it may just be that there hasn't yet been a need to do so. Peter