From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id BCE65384EF5E for ; Fri, 25 Nov 2022 16:29:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BCE65384EF5E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail 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-out1.suse.de (Postfix) with ESMTPS id C50D621AC1; Fri, 25 Nov 2022 16:29:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1669393760; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XHfQqcV/+NRWTFzklte74sreWlqoNCWVSQEW2HB3ghk=; b=GYoin7VFSjA5CZo+RHVP7oBDbBELprtOkMQRiZGp+83JUorh/ISLK9/9TBGwohpcJoHL7I MrPQEKcapqs9X0Fp0BgLEkbU2Brwz78E7BMb4yOGbtlps/Grk0KD9i2B6Gs2aDu9wZBeps PkoG1s/z23EJwL3Fa73Ys7iCrCeJiyc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1669393760; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XHfQqcV/+NRWTFzklte74sreWlqoNCWVSQEW2HB3ghk=; b=/LpnMkRfEIVQZmP37+Bw+6yBocM2kN6rsKI/Z6F8KtZc4WXcJEGb7M1fDOJ6tKD20KlvW1 jjxOwoMHBhZLYiCA== 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 A868E1361C; Fri, 25 Nov 2022 16:29:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id O19+J2DtgGPfKAAAMHmgww (envelope-from ); Fri, 25 Nov 2022 16:29:20 +0000 Message-ID: <772d9a17-3a8b-df94-24dd-51756ecfb3f9@suse.cz> Date: Fri, 25 Nov 2022 17:29:19 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH RFC] backends: Add RISC-V object attribute printing Content-Language: en-US To: Mark Wielaard , Andreas Schwab , elfutils-devel@sourceware.org References: From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_SOFTFAIL,TXREP autolearn=no 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 10/13/22 16:53, Mark Wielaard wrote: > Hi Andreas, > > 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? Martin > > Cheers, > > Mark