From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id 701F33852312 for ; Thu, 6 Jun 2024 01:17:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 701F33852312 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 701F33852312 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717636630; cv=none; b=aiFDiB5t8xTkTOP+S1zxFcLLSLVAYuP7I4ixLLlKFlqO7LqNB0tACjQpYInEmbnt0jvGheIcSxlTAIN4BOtetGQlO4onWU3G3qWARqDHdBMfxvwqbZhc9FfPlJocPOTFI6ZlzbKOG1O5S4K/1d8ajNTAmmSKcX5ueQVDDI5kt9A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717636630; c=relaxed/simple; bh=Vl7Xafnrv6hdBWLTWL+v0mylT1wNclZC5UlwAujVZjg=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=Nm9a0XSBmirI0BjnsSyOx2sJbEAAqipaXKzoiL6SCZO3kn3P10yL5SFEX6APuOe0Nwc+lkD2JtfreytvylfUp6Nq6tDgNWSqRXjhOSbU02xvHmC+CVOok65a/m67NpXFhV5eC27yjofVMdPqzJjjJm1tjfIe9gIFMh3szvlvgFY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-652fd0bb5e6so335984a12.0 for ; Wed, 05 Jun 2024 18:17:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717636627; x=1718241427; darn=sourceware.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Y/1du48WtIX3d/meAcqDbTiLyp7UotXpxLMsrAAon88=; b=meN4+jE49XTJjqF4Ft3HuNnWJzqQLO6dGHtDbRUjlyGkfoGwsR7k97EMGdaBNoq2bF N+ARMYLXnZeOntaWtlDE6oYQ+DwRDug+qENGKfpFznnzvslDktb6ix3zoOuoR+nfk2ko NmVN5YN0Pkz6XyCdDs8ZQlmVJSs6BaNrNcZoym9nSx1WLVkmQ7aU0UnYgHkUofWyMf08 DEduCLLqs3lHnwo27r13oCpZRQplK2BeXCW8sC593exgAlq4lIWmK0P3llcyTJJJUwGN J4nhVatS3IBxm70LjaJORZ3ut+/fUfrzp3BDlcQWM2CZnhw04uWmfNsPCIQNXkqo0c+1 rOwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717636627; x=1718241427; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Y/1du48WtIX3d/meAcqDbTiLyp7UotXpxLMsrAAon88=; b=D07bAQNHFQcizu82eiB6x2G436tMWZZ+wZ3mwfrqGYqdb/pPeMoHpcq/sL+CuVH0Gn n5ZzSDZRpbBTUwXaohF87gh8GFnh5MQBUcfhsGKXhBjzB7HbDiAIDgOsy9AqisbnavFI nUxPOywZemykO57cveTHO4OC5JcnJak7C9mc4m4vYcEK9MUV3b1l3L/7Vx88TeFrhAWm rjAy+Zccg2a6zojqC9NkAvbZdayZqf9b6tjbmU2zXPH3fPaH1ZqAayU0MolJOz87Nlbq fYOlwZbM/WEjvmqtQrpbDFpRTu6FarArmD/xy033UHB3SIm32N8TWEGgm3UUzu+T/A2R d2fg== X-Gm-Message-State: AOJu0Yxa4it8rHM8kS/enl5FZnvqwRfM4sevhVnR0PXvB8nNiHZo/MrN 3ducgITsLUk9pr9of+UnOM2d3pCrl1SnU/yTcmDlfUjU+ToLvs5W X-Google-Smtp-Source: AGHT+IHIB3yS5KRtyHPH5faeyXbTO5Z64lRRrS8DdbU+snBZow7WEDXb8MWH2LxA2p8GAfEH67w1Og== X-Received: by 2002:a17:90a:d196:b0:2c2:299b:15c6 with SMTP id 98e67ed59e1d1-2c27db6b5b8mr3975308a91.40.1717636626898; Wed, 05 Jun 2024 18:17:06 -0700 (PDT) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:566e:54f3:4b9a:f2bc]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c29c20d8c5sm255493a91.12.2024.06.05.18.17.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 18:17:06 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 65EE61140393; Thu, 6 Jun 2024 10:47:04 +0930 (ACST) Date: Thu, 6 Jun 2024 10:47:04 +0930 From: Alan Modra To: Szabolcs Nagy Cc: binutils@sourceware.org Subject: Re: [PATCH v2 1/2] aarch64: Fix DT_RELR support with discarded sections Message-ID: References: <164ea78d38dc1ee3fffe0380df23092fd3f8541d.1717522516.git.szabolcs.nagy@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <164ea78d38dc1ee3fffe0380df23092fd3f8541d.1717522516.git.szabolcs.nagy@arm.com> X-Spam-Status: No, score=-3025.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: On Tue, Jun 04, 2024 at 06:41:34PM +0100, Szabolcs Nagy wrote: > --- a/bfd/elfnn-aarch64.c > +++ b/bfd/elfnn-aarch64.c > @@ -9327,6 +9327,10 @@ record_relr_non_got_relocs (bfd *input_bfd, struct bfd_link_info *info, > return true; > if (sec->alignment_power == 0) > return true; > + if (!bfd_is_abs_section (sec) > + && bfd_is_abs_section (sec->output_section)) > + /* Input section has been discarded. */ > + return true; I think you should be using discarded_section here and in elfNN_aarch64_late_size_sections. > sreloc = elf_section_data (sec)->sreloc; > if (sreloc == NULL) > return true; > -- > 2.25.1 -- Alan Modra