From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x92c.google.com (mail-ua1-x92c.google.com [IPv6:2607:f8b0:4864:20::92c]) by sourceware.org (Postfix) with ESMTPS id F17F23858D28 for ; Mon, 6 Dec 2021 20:31:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F17F23858D28 Received: by mail-ua1-x92c.google.com with SMTP id ay21so22138351uab.12 for ; Mon, 06 Dec 2021 12:31:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=GYod8NZZj8Ts7YO7LG5BAXxZZk1EniGpmJxP8k+/90U=; b=BVdUG8cz0PDwKiiQG73VTiKS+WLeslZU+lflzHQ6KEmHLg1Qniqbf2zw2I78PkeXUn Qc9e3c0UvdAbmbbyfnoSODIjx4Kk9qo6fCrAeNpu2HCGTFQGEZAUPvyUl4/viSS0hqdh M7LQZL18VcimaukgiDtVzdwf0rTL8N+m9C62maEXGsSmM3uQRsbjOn6ZoIFqggP63SiK J/9s/n823KaZzpL7YkI1tjaN8AnE5uKBUd5qtx8/Mnhby0OtfNhgkBLsSyMoTv6DSpVN ipKk6hLNSwraQNLaJABvprrJ6+P1HgKNayaIHuuZX8fH3iOpFvv1wlzA3tNg92VB5iXb R4tA== X-Gm-Message-State: AOAM532rga350UuDe3FVB66spkQN9f9vs1AVr5vTEPyHUagfFX9Ma/YC FEnz00m9YCIAkK2ukwSBqHNQudmUrKcBFw== X-Google-Smtp-Source: ABdhPJxXmM0SlENvrL3PDowalEfCK5axA9aQiC6buRj2kvaPf+xoo8WAsSTPe5Jq7VdvqQ8nI4uvtQ== X-Received: by 2002:ab0:6f0a:: with SMTP id r10mr44883843uah.106.1638822689431; Mon, 06 Dec 2021 12:31:29 -0800 (PST) Received: from ?IPV6:2804:431:c7cb:30f8:a284:bef4:40ef:e94d? ([2804:431:c7cb:30f8:a284:bef4:40ef:e94d]) by smtp.gmail.com with ESMTPSA id f132sm4992513vkf.18.2021.12.06.12.31.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Dec 2021 12:31:29 -0800 (PST) Message-ID: <873a6969-8c06-5233-2b4c-48360e120f07@linaro.org> Date: Mon, 6 Dec 2021 17:31:27 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH] elf: Add elf checks for main executable Content-Language: en-US To: "H.J. Lu" , Florian Weimer Cc: GNU C Library References: <20211119150329.2200675-1-adhemerval.zanella@linaro.org> <87bl1tmtxz.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Dec 2021 20:31:31 -0000 On 06/12/2021 16:22, H.J. Lu wrote: > On Mon, Dec 6, 2021 at 11:09 AM Florian Weimer wrote: >> >> * Adhemerval Zanella: >> >>> +static void >>> +modify_abiversion (ElfW(Ehdr) *ehdr) >>> +{ >>> + ehdr->e_ident[EI_ABIVERSION] = LIBC_ABI_MAX; >>> +} >> >> So this is eventually controlled by the libc-abis file, right? >> >> I *thought* that the consensus was that binutils should bump version if >> absolute symbols are used. But I don't see that in the absolute symbol >> tests. >> >> Is this really doing anything? >> > > EI_ABIVERSION check works on executables created by the new linker > which bumps EI_ABIVERSION. This complements the existing > EI_ABIVERSION check on DSOs. This is orthogonal to the ABI version > check for existing ld.so binaries which needs an ABIVERSION version. > Currently only mips does actually set and checks different EI_ABIVERSION through VALID_ELF_ABIVERSION. For instance, -Wl,--hash-style=gnu with mips64 will set EI_ABIVERSION to 5.