From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 8F238385840F for ; Fri, 24 Feb 2023 08:55:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8F238385840F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id BB3E25C3B9; Fri, 24 Feb 2023 08:55:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1677228954; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Dx3HsiWFDEim+C6m13VnwdbnCA96Li6a+BeDNAgs8Bw=; b=U9rNJhc4O8PwlT09399ReztOPo/M/YLs5kEjpsAW9c/wzpbU8VsUIvJt9JNZwm3TWahX4a 7A+DkhWR+TcxgKSFdQYyfGTnBP68NZrXh1n9zdc9lD0GoSMDkm9lKNS7kJ+waIAhYhCxMI wXTaEMJug2nLQFwReWBaYJr7zRu0yio= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1677228954; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Dx3HsiWFDEim+C6m13VnwdbnCA96Li6a+BeDNAgs8Bw=; b=9hFPWNVS8pDlnRfE00cH0XXwxUhGKJdKPU5+UjNjXidldz9WFWC/yMLNpbePSbFYDPNdMS zHIgYMBhue8fPEBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8E62B13A3A; Fri, 24 Feb 2023 08:55:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id zDmzIJp7+GO1KAAAMHmgww (envelope-from ); Fri, 24 Feb 2023 08:55:54 +0000 Message-ID: Date: Fri, 24 Feb 2023 09:55:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH RFC] backends: Add RISC-V object attribute printing Content-Language: en-US To: Mark Wielaard Cc: Andreas Schwab , elfutils-devel@sourceware.org, Martin Jambor References: <772d9a17-3a8b-df94-24dd-51756ecfb3f9@suse.cz> <20230222225648.GC1713@gnu.wildebeest.org> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: <20230222225648.GC1713@gnu.wildebeest.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP 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: @Andreas: Can you take a look? Martin On 2/22/23 23:56, Mark Wielaard wrote: > Hi, > > On Fri, Nov 25, 2022 at 05:29:19PM +0100, Martin Liška wrote: >> On 10/13/22 16:53, Mark Wielaard wrote: >>> On Wed, 2022-08-10 at 11:27 +0200, Andreas Schwab via Elfutils-devel >>> wrote: >>>> This does not work yet. The RISC-V attribute tags use the same >>>> convention as the GNU attributes: odd numbered tags take a string >>>> value, >>>> even numbered ones an integer value, but print_attributes assumes the >>>> ARM numbering scheme by default for non-GNU attributes. >>> >>> Yeah, I see this comment in print_attributes: >>> >>> /* GNU style tags have either a uleb128 value, >>> when lowest bit is not set, or a string >>> when the lowest bit is set. >>> "compatibility" (32) is special. It has >>> both a string and a uleb128 value. For >>> non-gnu we assume 6 till 31 only take ints. >>> XXX see arm backend, do we need a separate >>> hook? */ >>> >>> Maybe we need a flag in the backend to tell whether attributes follow >>> the "gnu_vendor" convention? So that could be checked at: >>> >>> bool gnu_vendor = (q - name == sizeof "gnu" >>> && !memcmp (name, "gnu", sizeof "gnu")); >>> gnu_vendor |= ebl->has_gnu_attributes; >>> >>> Or something similar? >> >> Andreas: Can you please take a look at this? > > Has anybody had time to look at this? > > Thanks, > > Mark