From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id E5A4F385842B for ; Tue, 12 Jul 2022 12:19:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E5A4F385842B Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 324FB1FF02; Tue, 12 Jul 2022 12:19:58 +0000 (UTC) Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 2D0BB2C141; Tue, 12 Jul 2022 12:19:58 +0000 (UTC) Received: by wotan.suse.de (Postfix, from userid 10510) id 235E0665A; Tue, 12 Jul 2022 12:19:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by wotan.suse.de (Postfix) with ESMTP id 21E496655; Tue, 12 Jul 2022 12:19:58 +0000 (UTC) Date: Tue, 12 Jul 2022 12:19:58 +0000 (UTC) From: Michael Matz To: Alan Modra cc: binutils@sourceware.org Subject: Re: PR29355, ld segfaults with -r/-q and custom-named section .rela* In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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 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: Tue, 12 Jul 2022 12:20:00 -0000 Hey, On Tue, 12 Jul 2022, Alan Modra via Binutils wrote: > Fix that. Note that it is arguably wrong for ld to leave the output > .rel/.rela section type as SHT_REL/SHT_RELA when non-empty non-reloc > sections are written to it, but I'm not going to change that since it > might be useful to hand-craft relocs in a data section that is then > written to a SHT_REL/SHT_RELA output section. Much to my dismay I remember having seen exactly this in the wild, in recent years, but I don't remember the details anymore :-/ Ciao, Michael.