From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by sourceware.org (Postfix) with ESMTPS id 8CF523858C39 for ; Wed, 8 Dec 2021 00:02:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8CF523858C39 Received: by mail-yb1-xb36.google.com with SMTP id q74so1795098ybq.11 for ; Tue, 07 Dec 2021 16:02:09 -0800 (PST) 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=+2kNTiEB0FkuObnDCvFCpBxnYCbJy9U8nWqf8du7Etw=; b=gnHDqCQqA0Q3cIQsKoW59b07skgqcDYTHez9+vvyufI71Farr2wKA78jp2XlwP6UVa VDdxB14H9pY5ZDWQS+0P8IINWt03FGBBQZQOtiveJgw5tliThZVd/D/FA9ADdyD3nvUV wKQWSuBnDEli9jyNdWuoHEflOk7XEZNJv/M69gEsv7pLp5W5LYOAdN93/inn3wBxYF8A 7ZDG7m+JV+F7MqSvOuWbS6w3KDkMy5Hsje5pqi9pvvv89DM1twCGPzhTLYSxuUA3PKla 50q4Z9599Y9Tpr+MKOGXA7rJiag2a0DRXE7ytpSdXacnmWKrJ6TINdCyhXIogVZyPfb+ 1NVQ== X-Gm-Message-State: AOAM530JNqlQjcGQqwRIwM2KcCRGPfpryeEo/RaGnbw8sSZwoaIM4iGp 1LccyWGUQ8nSkZ5jVjLgkjVEzhNz290K0CYe8Vf1Dw== X-Google-Smtp-Source: ABdhPJw7k+Lz+iAvuaQBesn33p+69NGeY8M4KylEK0pWKCyY2OppqOvjuVM8ebJr1o7ky3K6JjXk+iBQfMQJUw9WnYA= X-Received: by 2002:a25:903:: with SMTP id 3mr54600893ybj.378.1638921728947; Tue, 07 Dec 2021 16:02:08 -0800 (PST) MIME-Version: 1.0 References: <20211119150329.2200675-1-adhemerval.zanella@linaro.org> <87bl1tmtxz.fsf@oldenburg.str.redhat.com> <873a6969-8c06-5233-2b4c-48360e120f07@linaro.org> <877dchlbb8.fsf@oldenburg.str.redhat.com> <6386c389-086d-e123-d4d6-a97777f207ed@linaro.org> <87czm8quz3.fsf@oldenburg.str.redhat.com> In-Reply-To: From: =?UTF-8?B?RsSBbmctcnXDrCBTw7JuZw==?= Date: Tue, 7 Dec 2021 19:01:58 -0500 Message-ID: Subject: Re: [PATCH] elf: Add elf checks for main executable To: Adhemerval Zanella Cc: Florian Weimer , GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-16.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, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=no 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: Wed, 08 Dec 2021 00:02:11 -0000 On Tue, Dec 7, 2021 at 12:35 PM Adhemerval Zanella via Libc-alpha wrote: > > > > On 07/12/2021 12:45, Florian Weimer wrote: > > * Adhemerval Zanella: > > > >> It does, but only for specific configurations. bintutils does have a > >> testcase for it, pr21375*, but not all configurations does bump because > >> they do not require ABS relocations (for instance, for n64 -mmicromips > >> --defsym hidn=1 does set the ABI version to 4). > > > > Should this tell us something at DT_RELR? That binutils doesn't help us > > to prevent crashes for other features? > > I think it tell us that binutils support for DT_RELR or any other potential > abi disruptive feature will need a better ABI enforce for all Linux or > affected ABI. It seems that binutils support are not really unified with > the multiples architectures and ABI. > > But I think it should be doable on linker side. For DT_RELR, you may see https://maskray.me/blog/2021-10-31-relative-relocations-and-relr#ei_abiversion Many Linux executables (STB_GNU_UNIQUE/STT_GNU_IFUNC are not used) use ELFOSABI_NONE and the linker does not and should not bump EI_ABIVERSION.