From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER,SPF_HELO_PASS,SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id A09A41F55B for ; Wed, 20 May 2020 10:27:52 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A247B386F800; Wed, 20 May 2020 10:27:51 +0000 (GMT) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2060.outbound.protection.outlook.com [40.107.22.60]) by sourceware.org (Postfix) with ESMTPS id 319333851C22 for ; Wed, 20 May 2020 10:27:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 319333851C22 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Szabolcs.Nagy@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hZO9SWuYErr4S1k8fXLOpMe/vZ0Wo2B3nnmrV6bsP78=; b=9xTRgbigTJecTPW/h7BkIdLKpkkevGqDBdBsmLByr7pGlKIxBIr1gz/UXcj5Z7lr6UbdrzfQW3F9sVewPgv9RM80rcrgTX8ahF4e8H85BOgmysxCM6LyMjhOfFOqvfEfhr8xkAhgkDoMoFhQ93Ev44wnBV16vY7FQ8yr/YefHxg= Received: from DB3PR08CA0007.eurprd08.prod.outlook.com (2603:10a6:8::20) by VI1PR0802MB2254.eurprd08.prod.outlook.com (2603:10a6:800:9c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20; Wed, 20 May 2020 10:27:46 +0000 Received: from DB5EUR03FT050.eop-EUR03.prod.protection.outlook.com (2603:10a6:8:0:cafe::5d) by DB3PR08CA0007.outlook.office365.com (2603:10a6:8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23 via Frontend Transport; Wed, 20 May 2020 10:27:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; sourceware.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT050.mail.protection.outlook.com (10.152.21.128) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23 via Frontend Transport; Wed, 20 May 2020 10:27:46 +0000 Received: ("Tessian outbound facc38080784:v57"); Wed, 20 May 2020 10:27:46 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: ba89178ea7070690 X-CR-MTA-TID: 64aa7808 Received: from 60cff77b8cff.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id EFDF24A9-5148-445F-9739-0C0438844F84.1; Wed, 20 May 2020 10:27:40 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 60cff77b8cff.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 20 May 2020 10:27:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NYLb+cKla1gXKjIa3sNYGNZZlRLWRaIDI5coq48FWnwoaRnKLFnbeHqws+VfMw2KX1OBY/C1hJ41Lhd5RmvFSsIRzBgrzxCwlswsYfSWZevx2w2ikTMbK3a4PWUIICgOlce3hzG778VQPN+xCVLH/LRBwJ1yVSH/pmV295V4BqJ+z0UQlb87VMh4b5pFKWD6qPWFDX+h6VZ3idGTbXXnWXZEfYSDtNNv2o2ZFWQmNnm6IyI2/Uya3Bv5sijSdrVW3bmW0PBUL6/6OrPz4Iv2+syTcoNr6PKXl0cQlFUi5NpAYuFHVYD5xyJuV4ipFAOSw8j1dMx3H/hNT5/YgudU6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hZO9SWuYErr4S1k8fXLOpMe/vZ0Wo2B3nnmrV6bsP78=; b=PQmftczkQNQnyA9wIhyBJQXy6J5n1F3Ytg5RdLBP776HV/hrfSrK+Ybl2uIKMLbISAWYIIMrYg9wFjkjIpK6VoZwwFsjGMlyGq2WNksHxSesbBUF9kPlH66UON2gReXJgu4MPOnL5XJSP91zxN0yOPdlyqZjxC4SjRkGYB/Wb2jXaSbhzxD7NnUUOD7Q4CEd46Spfyha5jkV8HQtx4z5xF/LteKnxWnKLEBuoc7Zop43vTIZrPjEnzSIF5oj8b62tcR/lgWarg5aYntkj7ZAHkHKhqdq31TqoUXMFzPpm3avJAdi21PaRyBCXvknYuR4/e0DDU3Ph0Ubxm8Tj+rTXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hZO9SWuYErr4S1k8fXLOpMe/vZ0Wo2B3nnmrV6bsP78=; b=9xTRgbigTJecTPW/h7BkIdLKpkkevGqDBdBsmLByr7pGlKIxBIr1gz/UXcj5Z7lr6UbdrzfQW3F9sVewPgv9RM80rcrgTX8ahF4e8H85BOgmysxCM6LyMjhOfFOqvfEfhr8xkAhgkDoMoFhQ93Ev44wnBV16vY7FQ8yr/YefHxg= Authentication-Results-Original: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=arm.com; Received: from AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) by AM6PR08MB4836.eurprd08.prod.outlook.com (2603:10a6:20b:cc::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23; Wed, 20 May 2020 10:27:39 +0000 Received: from AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::49fd:6ded:4da7:8862]) by AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::49fd:6ded:4da7:8862%7]) with mapi id 15.20.3021.020; Wed, 20 May 2020 10:27:39 +0000 Date: Wed, 20 May 2020 11:27:37 +0100 From: Szabolcs Nagy To: Florian Weimer Subject: Re: [PATCH v3 03/13] Rewrite abi-note.S in C. Message-ID: <20200520102737.GA22228@arm.com> References: <6fbbbbbca662497f180ea5356d50a4f16a3b5716.1589552054.git.szabolcs.nagy@arm.com> <877dx99sam.fsf@oldenburg2.str.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <877dx99sam.fsf@oldenburg2.str.redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: LO2P265CA0277.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a1::25) To AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from arm.com (217.140.106.55) by LO2P265CA0277.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a1::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23 via Frontend Transport; Wed, 20 May 2020 10:27:39 +0000 X-Originating-IP: [217.140.106.55] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a7465edb-0c04-49d9-b4b5-08d7fca8703c X-MS-TrafficTypeDiagnostic: AM6PR08MB4836:|VI1PR0802MB2254: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6430;OLM:6430; X-Forefront-PRVS: 04097B7F7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: pfUVa52uH3lX48DB5WchqLG/5yTrAB+/427MrAZgaM+VlKzZlzIL6rNnefoSaiwf2YlQQ6ZFEpb57MkCSRHqCZBpTzmK/vI4yL6Xd0RhgmQeppLc+e5mN8lcuLGP3Og9c2D24xySDdKo3cq9iWKZJrzuM7dTVkQS5FJzfMreHbB0HrG0N8MwwkUfJeRn0/QotaufUI702vNMSc6h4crYKRSGDcoVpilmSiOYYsls0cudHya+DLo5BJj2DSCrk4gRQU6us1U6dE1eFsRjSXLI28EfGuTck4oksVRJpVrIdbNaf6JgPVq42Xrw/E4f63IFeMVqpFjKg20dWkWJubzclQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR08MB3047.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(376002)(346002)(366004)(39860400002)(136003)(396003)(36756003)(33656002)(66946007)(6916009)(316002)(66556008)(66476007)(16526019)(55016002)(186003)(7696005)(4326008)(52116002)(2906002)(5660300002)(8886007)(26005)(8936002)(1076003)(44832011)(8676002)(86362001)(478600001)(956004)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: nlIHG93PbALoV94yGsgFbXvFPB1C28Ll/R0E5TcCC+rb75fgBWcsH+6tNnqDob70/uM/qogtlHuHNihMkr7XqkeK/oZb+h3RB68mJtF8pCFVt3wtaVFMf9TfzcFLigDN21RYnMU4ak7mVWa5Q77g1agMcdb+vNykiXUtUnq9JHa2+ChNotejFzeeNjesTtsFy4c54p91Pd5Bc/5Num53awWop3RSg4khqlMk61Zr5swVJffYeGmIUYrDA7AU5g0X5h7rz/LJT+ohszaXM3DdlP7bB+OMIJRsU7I1f2JY9pZf0gQpt5xehUoHGimxyYLSnx47tigj6VahDa3fkx1BrVJf4Wta8/lo4NTt8F3lRH+m8FZGrEPxBQyJ8C5HkiO/D01v6xdmjqfcBNZ5us4j2DwokgYMOuRe+j4aNeQs+sYMCHw9ke5qqf1r+F6b5oxBZy1LZwm+kuXhuLvkaWPxCqQIAhYd2NgPO2LmCz4we/sX0k8fIfgfFHveObOGE+0Q X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4836 Original-Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT050.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(136003)(346002)(396003)(376002)(46966005)(70206006)(336012)(1076003)(8676002)(8936002)(86362001)(6862004)(5660300002)(478600001)(36756003)(4326008)(55016002)(70586007)(81166007)(316002)(2906002)(26005)(7696005)(956004)(82740400003)(16526019)(82310400002)(2616005)(8886007)(356005)(33656002)(44832011)(47076004)(186003); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 19df93bc-fa4f-4162-e363-08d7fca86c07 X-Forefront-PRVS: 04097B7F7F X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ew9vrnkrbvtKl6i8a6/HX9dJbYGMu3cVdLeWYuzUmgR+Jtm/76qI9osLAF9GKt/33lzCafcjHrEkrA5EI3o8XMEnJ/VGvRh5NQk6na2/iw2GHocsEN3zzh/T1mBulCI376DHKEwkB5hqAEl6FC+GVknz4ALzhFwxLUiiL9AMXWuBgAKvtL+U4P/WjflfsEZyFedkjGyPXy31Ps+l/X2Qh7upC7roSb+g1rSt+y7NPDgzQZvTDl2YzrSdFL09JTZaQ89clE0mODOzMhlRBVkTh/RLlxS1Ko+ei7bBmnQY+9u6J8JPllpxGN2Rg31M7y/1MxWVWOAPUW6gYxMHifQeURDyha21MusEihuuNW8BzwQwSQvV52TEdvKNb00OPU6yiQjhwc4NTRfIW+Oy77L/98ghYrCibjVzJzRFXRYpAq/VK65e217erZpoU/rA2dMjkW8iGENzJKCWVMTlq1sk/ds11zcDS6RW9fHkKQ+BstL2oqazjLeI0zD1CGYyLztNB2JumFioXQbYPquchx/W+g== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2020 10:27:46.3886 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a7465edb-0c04-49d9-b4b5-08d7fca8703c X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2254 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: , Cc: libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" The 05/18/2020 17:28, Florian Weimer wrote: > * Szabolcs Nagy: > > > +/* Note: Custom type is used as ElfW(Nhdr) is wrong on 64 bit targets. */ > > Are you sure about that? > > typedef struct > { > Elf32_Word n_namesz; /* Length of the note's name. */ > Elf32_Word n_descsz; /* Length of the note's descriptor. */ > Elf32_Word n_type; /* Type of the note. */ > } Elf32_Nhdr; > > typedef struct > { > Elf64_Word n_namesz; /* Length of the note's name. */ > Elf64_Word n_descsz; /* Length of the note's descriptor. */ > Elf64_Word n_type; /* Type of the note. */ > } Elf64_Nhdr; > > The types are the same: > > typedef uint32_t Elf32_Word; > typedef uint32_t Elf64_Word; > > I admit this is super-confusing. aah i missed this, then the struct can be #include __attribute__ ((used, aligned (4), section (".note.ABI-tag"))) static const struct { ElfW(Nhdr) nhdr; char name[4]; int32_t desc[4]; } __abi_tag = { { .n_namesz = 4, .n_descsz = 16, .n_type = 1 }, "GNU", { __ABI_TAG_OS, __ABI_TAG_VERSION } }; i think the aligned attribute is still needed in case on some target uint32_t has smaller alignemnt than 4. i can change this if it is considered to be better or just remove the incorrect comment.