Message ID | 20230721074956.7188-1-piannetta@kalrayinc.com |
---|---|
Headers |
Return-Path: <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp37258vqg; Fri, 21 Jul 2023 00:50:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlFrNf+HCucJBONpUq9rsWC78WZYUPsTfzCqPESqJGfEF0g+WL6b42b3UB0N/lyHdI4HyG/X X-Received: by 2002:a17:906:1d9:b0:973:ca9c:3e43 with SMTP id 25-20020a17090601d900b00973ca9c3e43mr1003808ejj.45.1689925823511; Fri, 21 Jul 2023 00:50:23 -0700 (PDT) Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id f7-20020a170906494700b0095317ae767esi1758228ejt.46.2023.07.21.00.50.23 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jul 2023 00:50:23 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=qIraJQrf; arc=fail (signature failed); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CACA7385483D for <ouuuleilei@gmail.com>; Fri, 21 Jul 2023 07:50:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CACA7385483D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1689925821; bh=r1Jxfb+V5DKFRdlGLQQeFP3ETJrC4qU1BfhWsimjUM4=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=qIraJQrfGZV+6YjQGLJClkoRNzTakVivC7+gWqMiTE6+x9UXP0gxMI2LvAFUT9qzN ukZiVAcIqhvMQPRQDXjff0Y+bqfSiFTS1gev3+DCDfPez+46sF9+I1X3G6fL7MgKQ+ FB/1L1h8+O9bFwF13A5utZcNHRyOeRO2NJsjQiKA= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from smtpout140.security-mail.net (smtpout140.security-mail.net [85.31.212.145]) by sourceware.org (Postfix) with ESMTPS id 94E0F3858C54 for <binutils@sourceware.org>; Fri, 21 Jul 2023 07:50:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 94E0F3858C54 Received: from localhost (fx405.security-mail.net [127.0.0.1]) by fx405.security-mail.net (Postfix) with ESMTP id 8DE1D335DC4 for <binutils@sourceware.org>; Fri, 21 Jul 2023 09:50:08 +0200 (CEST) Received: from fx405 (fx405.security-mail.net [127.0.0.1]) by fx405.security-mail.net (Postfix) with ESMTP id 6D7EC335DAA for <binutils@sourceware.org>; Fri, 21 Jul 2023 09:50:08 +0200 (CEST) Received: from FRA01-MR2-obe.outbound.protection.outlook.com (mail-mr2fra01on0102.outbound.protection.outlook.com [104.47.25.102]) by fx405.security-mail.net (Postfix) with ESMTPS id 6C5AF335D5D for <binutils@sourceware.org>; Fri, 21 Jul 2023 09:50:07 +0200 (CEST) Received: from MR1P264MB2482.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:33::22) by MR1P264MB1731.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:3::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.25; Fri, 21 Jul 2023 07:50:06 +0000 Received: from MR1P264MB2482.FRAP264.PROD.OUTLOOK.COM ([fe80::e37a:10dd:d14d:a28d]) by MR1P264MB2482.FRAP264.PROD.OUTLOOK.COM ([fe80::e37a:10dd:d14d:a28d%7]) with mapi id 15.20.6609.026; Fri, 21 Jul 2023 07:50:06 +0000 X-Virus-Scanned: E-securemail Secumail-id: <1421d.64ba38af.6b9c6.0> ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q8fg/SO77rbRhgCf9iK/+Jo0H0bcBnC10rWcXWbwH623PAcm2NYtzOenzXQ+uWfJ4cXxVzDvYu2zzXwTDtz5RVqK/rkYhlmcm4MDZXzwMI1e+aW0yfiMItMXlduNgp5sMB1JXRp7y2eSDxVs6DhITvvGh/wfRdVyYUAVvFBa0s8igKZ6GpRiX93IBlxz3kT60bliXyXe7YQPm4OLjrCrt8/1d9yaATlqOi2ACzsrbyObVPfoxzJgsqCYSZl3+r2OtOhhYX38lwHR9Hh7Dhsmwm0ncy19YSgudeZTDrghhsPyKTJl+4WcJQ98pYd2abUrrbijSoZW3eCeGnTxAesA3g== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=r1Jxfb+V5DKFRdlGLQQeFP3ETJrC4qU1BfhWsimjUM4=; b=jmnBGJBuJhUxYaAqlYY4rhmASxMTKS4huIg/rJQKWJbk++MwxNzYJg+BqPByGe/G/5TYiV5FrGd6iMsA/bwOp29LIhdnWcI0A0VzhwgLzHhdadLwPET5iTg/wzOTFq6uJ4m56JGdQ/IeTkxdYOJrryV+AWY/SjdPkZz02OorKs9kW8p4MnE0BnHqhAKN6f8ZTimsn+OzlXr94x8PKeSR6YVfPQwZxBSAT2a5smVG7Xe3Z22JiMbi++3338uggs1ELeDkkaXUbznUPcJ8yAptJ21OL/uqqk0hEsQ0qQ0obBzHAoBfb0nor6nziuFeEfTYzl5sUfXhcviV1/k757i8DA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kalrayinc.com; dmarc=pass action=none header.from=kalrayinc.com; dkim=pass header.d=kalrayinc.com; arc=none To: binutils@sourceware.org Cc: Paul Iannetta <piannetta@kalrayinc.com> Subject: [PATCH 0/7] kvx: New port. Date: Fri, 21 Jul 2023 09:49:49 +0200 Message-ID: <20230721074956.7188-1-piannetta@kalrayinc.com> X-Mailer: git-send-email 2.35.1.500.gb896f729e2 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P265CA0041.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ac::17) To MR1P264MB2482.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:33::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MR1P264MB2482:EE_|MR1P264MB1731:EE_ X-MS-Office365-Filtering-Correlation-Id: 9ab066f3-36d5-483f-8631-08db89bf19b0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: H88Pp8aG+blfWUNaAf4CQIVNE5lq1rhURCTNMaW/Zaie4vBy13rcuLiN6/fzNiFyiOGrEvyFL6R9bLIaj++4sYIkDMahxjY8wNOKQTgpb4bIKMdf9QOaO5UXvLyRa/bD6N3SWlUF0jHCaq2617XbEL3zd3fWm36ecje51/rgCKBsfSO0uHuhpDT8uqU+ZKUyCiMfk2lh/mhk3499U8PXV03PZvhi6dN8Ex3W599OfMznrfXXUjmzdz4SGADc48Dr2IdABov8wN046IHdENnOSRcR+WqCK5jYDqxagikLX2QhKiJmKxHN348//qtFy7pl+Ei4VOgldedgNKlNSkeCl1YGG9z18k/cRFX3+1cuW6sa/I6cWzvlYMeprr56ugzaTwlVod64tCYrhDAdAaHiDlMU9OHB5ZGEQAElqI9JpULTO/U6CLyBFWndigvsclHAQ9tGoqQ/9qHbocZhyBE7izH7WrwCceiouEW5oovSgBCm40NJEU19f9zPjZffrsWs51lBwBVYxwGAwdNlSzDFaaqtijOrKJ9JFlFwIH//2DLgsW+3oo5lrhgP/e9Jb5Dt X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MR1P264MB2482.FRAP264.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230028)(4636009)(136003)(396003)(366004)(39850400004)(346002)(376002)(451199021)(6666004)(6486002)(478600001)(6916009)(26005)(6506007)(1076003)(107886003)(6512007)(4326008)(38100700002)(66556008)(66476007)(66946007)(186003)(2616005)(5660300002)(4744005)(8676002)(8936002)(2906002)(41300700001)(316002)(86362001)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Hcp4W1chKmdKXY6GHjERMG3mmAVrAKM/cQk5EAuLNk+QlYgbocKZxyAsUUlp8AvgQ1jx4VfnPHQHVtL5MHmrd+0hwZ8Ax3/YR2Gk7lZpIkMwYSzb44RaOEbJFizlpbiAJmxSSqAoPStQvK3zOpgrdpFZuLjNi7+wO6vW42UDr6BHTR4bPfZMxUiKpPKLcpN0NTlVQ1Trj7oele7A/zwf4YiyBGC5gKMRabPcwR9ob4YcSGGqkjqMyrkKEyv9VKsxZyByqOcuPO+mXZ1Em67gUoPu5jwX3ZDqFRmLPAn2Kogv6WVTh6Wt8mU6sXhMijWCZ/ktcs70bIkFMsHmkK+Vsi/BdFwz9mTolma8TJh6Fjsz62zaOC7zpEB39M7jeCzHjmKv8RwlDEgvdyg+JUP40rig7Tcc21vf7Xnpi/B0FhbJz2N6laIPJzMtRlA9d5bpy5kOCf3yI9Dpdt+Q3/tmd8EeLVwKaK719ajtfWq4j/IctRGwgpMVwsTnBmlbU6BHA0EWcZrPRwM0zw54W91G38SoKOocSB9jL7OQNi/3K6qPEui4Z0IU0Y6/FoVmogTNBxwSWuDRN8T3nprbAhw8PQer7HqbieOqmLgejXQoMVz/XT8mf8QoIelbLzNsrzzID199XHw3AuFrdFhv90SDlvtOCsTVZEqdHzWQ2lEaAm8rHWVO8+nnc9F6qyO8NWUfV+BRLi7BqX17tA9jd5R7pyhb4XbnQnHRPareaOrHw6aL24dK0DtcAYe4P2C64lDt8r9MZJU3ufEuDyLVPJah9D4rDWloLhLGwG4OByU0zGBdQaoZCvOS3YSXC7lp4NxeQAFQ6yKKRC5VQoY56YIxZOhKXX6k4p6n2dso9wAPi+PqKFBGtiBhnT2EC5fsGuFlm2xpyn9W9AwMvahKap2oQdiac01NgwL8BmIv3dhKHLt6jGKYbUmqBcX5ojV/1rLx dVfqiqzXXoEO99EFUKURFN9oo6ptUg8YL+TQnreqhqMAFPzJvR9q1dtbpOytZtfM7+6+7hH0+f9p31WqhqBiYf7KRO8mIg2NDCPnnb6Gk39BIs3p2VzKvKk3GLTbzmu/2VIpGTtLclrLEE78+Z576GXsP66DPU9Qtot0D2GmziiI8Cd9oXQ/FJoPkDKwJwDlCiTKMrHY/baoSUvhs+k5WRjP9OwafKL8eoiS83F45qHiEyb6/gdLZbpWHwEbSW8OIqOvpiUVznASyX3oCKVbOBsK6UKMDK2C7xdVV4ZZnNgT3MHrldYIGGaYEDu3Ajy3NhL2d8yaLVWnXza3+n3JDP9sL8JH8dMrRBc+CsR8wKLTrPQ9Oks5aG48qITTyFnemXQPhrYDhqJta3GiAMtVgcSHsD1EUfkHktvWM23hjf6hd/Uberhv+OTEwkp2YercWi18SqP/Y6F/cIXAiNZ+zD3hbiIDN5oPp9EKzmbfz1Q0LN/WyOVNcwjVdj0ALBJ6kQzHZPUePGAKYQbzlWPAvnce3yCBKWJA+bgafKZdThAtVr20AeuMH1AdcmSZqZB8sGcY0jV8JJk4QBF3UUtDV28l82pTIOVkSpM91WJ2eHdySHpzuZubwZ+YhMY6j/v2uukcTCYiNVpjXJX4fazzDw== X-OriginatorOrg: kalrayinc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9ab066f3-36d5-483f-8631-08db89bf19b0 X-MS-Exchange-CrossTenant-AuthSource: MR1P264MB2482.FRAP264.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2023 07:50:06.6426 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8931925d-7620-4a64-b7fe-20afd86363d3 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: t1Vx2sVbIFgKN5uXLgtCSiWnE99It9W0VKCdNQxz+eoL9INZ2wPypg3DbtIOc4tGA6LUuI6uEM7f9EKmldfDHw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MR1P264MB1731 Content-Type: text/plain; charset=utf-8 X-ALTERMIMEV2_out: done X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, 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 <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> From: Paul Iannetta via Binutils <binutils@sourceware.org> Reply-To: Paul Iannetta <piannetta@kalrayinc.com> Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772015660640200399 X-GMAIL-MSGID: 1772015660640200399 |
Series | kvx: New port. | |
Message
Paul Iannetta
July 21, 2023, 7:49 a.m. UTC
On behalf of Kalray - a semiconductor company based in the south of France - I would like to contribute the binutils port for the KVX ISA, with the following sub-architectures: - kv3-v1: 3rd gen (Coolidge), 1st revision (stable); - kv3-v2: 3rd gen (Coolidge), 2nd revision (stable); - kv4-v1: 4th gen (Dolomites), 1st revision (experimental). I will be the maintainer of the port. I've split up the port into as many parts as subdirectories we have changes in, the current set of patch covers the binutils without gdb (that we plan to upstream in a second time.) Kalray has completed the copyright assignment forms from FSF for the binutils. Please let me know if I am missing anything. Regards, Paul Iannetta, Kalray
Comments
Hi Paul, > On behalf of Kalray - a semiconductor company based in the south of France - I > would like to contribute the binutils port for the KVX ISA, Thanks very much for doing this. > Please let me know if I am missing anything. It may just be my mailer, but I am only seeing parts 1,2,4,5,7 of your patch series. IE parts 3 and 6 appear to be missing. My guess would be that these are for the opcodes and gas sub-directories. Do I need to investigate on my end, or did something go wrong when you sent them ? Cheers Nick
Paul Iannetta via Binutils <binutils@sourceware.org> 于2023年7月21日周五 15:51写道: > > On behalf of Kalray - a semiconductor company based in the south of France - I Very interesting. Is it possible for us to read ISA and ABI documents? A quick search didn't give me the path. > would like to contribute the binutils port for the KVX ISA, with the following > sub-architectures: > - kv3-v1: 3rd gen (Coolidge), 1st revision (stable); > - kv3-v2: 3rd gen (Coolidge), 2nd revision (stable); > - kv4-v1: 4th gen (Dolomites), 1st revision (experimental). > > I will be the maintainer of the port. > > I've split up the port into as many parts as subdirectories we have changes in, > the current set of patch covers the binutils without gdb (that we plan to upstream > in a second time.) > > Kalray has completed the copyright assignment forms from FSF for the binutils. > > Please let me know if I am missing anything. > > Regards, > Paul Iannetta, > Kalray > > > > >
On Fri, Jul 21, 2023 at 04:57:50PM +0800, YunQiang Su wrote: > Paul Iannetta via Binutils <binutils@sourceware.org> 于2023年7月21日周五 15:51写道: > > > > On behalf of Kalray - a semiconductor company based in the south of France - I > > Very interesting. Is it possible for us to read ISA and ABI documents? > A quick search didn't give me the path. > Thank you for your interest. I'll reach back to you as soon as I have the approval. > > would like to contribute the binutils port for the KVX ISA, with the following > > sub-architectures: > > - kv3-v1: 3rd gen (Coolidge), 1st revision (stable); > > - kv3-v2: 3rd gen (Coolidge), 2nd revision (stable); > > - kv4-v1: 4th gen (Dolomites), 1st revision (experimental). > > > > I will be the maintainer of the port. > > > > I've split up the port into as many parts as subdirectories we have changes in, > > the current set of patch covers the binutils without gdb (that we plan to upstream > > in a second time.) > > > > Kalray has completed the copyright assignment forms from FSF for the binutils. > > > > Please let me know if I am missing anything. > > > > Regards, > > Paul Iannetta, > > Kalray > > > > > > > > > > > > > -- > YunQiang Su > > > >
Hi Nick, On Fri, Jul 21, 2023 at 04:46:16PM +0100, Nick Clifton wrote: > Hi Paul, > > > Yes, part 3 (gas) and 6 (opcodes) are respectively 1.5M and 3.5M big, > > so they are waiting for moderator approval. Maybe I should have sent > > them through a different medium? > > Can you supply them in a compressed format attached to an email ? > Thank you, it was indeed very effective :) > Since the patch is presumably mostly text, a good compression algorithm > ought to be very effective. > > Cheers > Nick > Thanks, Paul
Hi Paul, > On behalf of Kalray - a semiconductor company based in the south of France - I > would like to contribute the binutils port for the KVX ISA, Fantastic - thank you for contributing this work.a > Please let me know if I am missing anything. Are you - or someone else at Kalray - offering to become a maintainer of the KVX port ? Being a maintainer not only involves fixing bugs, but also monitoring the mailing lists for bug reports, and, ideally, working to keep the port up to date and bit-rot free. Cheers Nick
Hi Paul, I tried compiling the binutils for a kvx-elf target with your patches applied and I ran across a compile time warning/error: gas/config/kvx-parse.c: In function 'parse_with_restarts': gas/config/kvx-parse.c:766:3: error: using a dangling pointer to '__buf_tok' [-Werror=dangling-pointer=] 766 | printf_debug (1, "\nEntering rule: %d (Trying to match: %s (%s)[%d])\n", jump_target, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 767 | TOKEN_NAME (CLASS_ID (tok)), TOKEN_STR (tok), CLASS_ID (tok)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gas/config/kvx-parse.c:391:6: note: '__buf_tok' declared here 391 | char __buf_##token[256] = { 0 }; \ | ^~~~~~ gas/config/kvx-parse.c:767:46: note: in expansion of macro 'TOKEN_STR' 767 | TOKEN_NAME (CLASS_ID (tok)), TOKEN_STR (tok), CLASS_ID (tok)); | ^~~~~~~~~ cc1: all warnings being treated as errors This is with gcc v13 on a Fedora 38 box... It looks like the TOKEN_STR macro is doing some funky things that are not fully supported by gcc 13... On a related note, building a toolchain configure as --enable-64-bit-bfd --enable-targets=all results in: /bin/ld: ../bfd/.libs/libbfd.a(targets.o):(.rodata+0xbc8): undefined reference to `kvx_elf64_vec' /bin/ld: ../bfd/.libs/libbfd.a(targets.o):(.rodata+0x1b98): undefined reference to `kvx_elf64_vec' /bin/ld: ../bfd/.libs/libbfd.a(targets.o):(.rodata+0x1ba0): undefined reference to `kvx_elf64_linux_vec' collect2: error: ld returned 1 exit status I believe that this is because you are missing an entry for elf64-kvx.lo from the BFD64_BACKENDS list defined in bfd/Makefile.am... Cheers Nick
Hi Nick, On Mon, Jul 24, 2023 at 10:04:54AM +0100, Nick Clifton wrote: > Hi Paul, > > > On behalf of Kalray - a semiconductor company based in the south of France - I > > would like to contribute the binutils port for the KVX ISA, > > Fantastic - thank you for contributing this work.a > Thank you. > > Please let me know if I am missing anything. > > Are you - or someone else at Kalray - offering to become a maintainer of the KVX port ? > Yes, I will be the maintainer of the port. > Being a maintainer not only involves fixing bugs, but also monitoring the mailing > lists for bug reports, and, ideally, working to keep the port up to date and bit-rot > free. Yes, that is what I intend to do. I am already monitoring the mailing list but did not have much occasions to participate yet. Thanks, Paul > > Cheers > Nick >
Hi Paul, First a request: please could you add updates to the gas/NEWS and ld/NEWS files mentioning the fact that the KVX architecture is now supported. Next some code review. I am going to skip over code formatting and comment structure issues for now, and also my favourite bugbear (calls to abort() in library code which stops the user of the library from handling error conditions), and instead focus on potential bugs and coding problems. Except that I cannot find any! Visual inspection may not be a perfect tool, but I have looked over your code and it all looks good to me. I will still need to check that the next set of patches compile and that the assembler and linker work, but I have to say that the contribution is looking very good so far. Cheers Nick PS. It might me nice to have a few more KVX specific test files added to the assembler testsuite. One at least that checks that each of the instructions assembles as expected...
Hi Nick, The attached archive contains 3 more patches that could be squashed into the previous patches adding the ld and gas files. The first one adds new tests in gas checking that all instructions are correctly assembled, and the other two are updates to gas/NEWS and ld/NEWS. I'll improve test coverage in later patches. Concerning the code, the disassembler (opcodes/kvx-dis.c) could be in a better shape, there is still quite a bit of code duplication but I'll be working on improving it. I tried to pay attention to the GNU coding guidelines but I might have overlooked some parts (especially the linker, and there may be quite a few aborts there as well.) Thanks, Paul
Hi Nick, On Mon, Jul 24, 2023 at 10:28:07AM +0100, Nick Clifton wrote: > Hi Paul, > > I tried compiling the binutils for a kvx-elf target with your > patches applied and I ran across a compile time warning/error: > > gas/config/kvx-parse.c: In function 'parse_with_restarts': > gas/config/kvx-parse.c:766:3: error: using a dangling pointer to '__buf_tok' [-Werror=dangling-pointer=] > 766 | printf_debug (1, "\nEntering rule: %d (Trying to match: %s (%s)[%d])\n", jump_target, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 767 | TOKEN_NAME (CLASS_ID (tok)), TOKEN_STR (tok), CLASS_ID (tok)); > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > gas/config/kvx-parse.c:391:6: note: '__buf_tok' declared here > 391 | char __buf_##token[256] = { 0 }; \ > | ^~~~~~ > gas/config/kvx-parse.c:767:46: note: in expansion of macro 'TOKEN_STR' > 767 | TOKEN_NAME (CLASS_ID (tok)), TOKEN_STR (tok), CLASS_ID (tok)); > | ^~~~~~~~~ > cc1: all warnings being treated as errors > > This is with gcc v13 on a Fedora 38 box... Yes, indeed, it was more of a convenience macro but it is not well supported by gcc13+, that's the only location it is used so you can safely comment out those lines and I will remove them as well. > > It looks like the TOKEN_STR macro is doing some funky things that are not fully > supported by gcc 13... > > > On a related note, building a toolchain configure as --enable-64-bit-bfd --enable-targets=all > results in: > > /bin/ld: ../bfd/.libs/libbfd.a(targets.o):(.rodata+0xbc8): undefined reference to `kvx_elf64_vec' > /bin/ld: ../bfd/.libs/libbfd.a(targets.o):(.rodata+0x1b98): undefined reference to `kvx_elf64_vec' > /bin/ld: ../bfd/.libs/libbfd.a(targets.o):(.rodata+0x1ba0): undefined reference to `kvx_elf64_linux_vec' > collect2: error: ld returned 1 exit status > > I believe that this is because you are missing an entry for elf64-kvx.lo > from the BFD64_BACKENDS list defined in bfd/Makefile.am... Thanks, I'll have a look. > > Cheers > Nick > Thanks, Paul
Hi Nick, > On Mon, Jul 24, 2023 at 10:28:07AM +0100, Nick Clifton wrote: > > [snip] > > On a related note, building a toolchain configure as --enable-64-bit-bfd --enable-targets=all > > results in: > > > > /bin/ld: ../bfd/.libs/libbfd.a(targets.o):(.rodata+0xbc8): undefined reference to `kvx_elf64_vec' > > /bin/ld: ../bfd/.libs/libbfd.a(targets.o):(.rodata+0x1b98): undefined reference to `kvx_elf64_vec' > > /bin/ld: ../bfd/.libs/libbfd.a(targets.o):(.rodata+0x1ba0): undefined reference to `kvx_elf64_linux_vec' > > collect2: error: ld returned 1 exit status > > > > I believe that this is because you are missing an entry for elf64-kvx.lo > > from the BFD64_BACKENDS list defined in bfd/Makefile.am... > > Thanks, I'll have a look. I have removed references to `kvx_elf64_linux_vec', and followed your advice, it should now compile if you apply the attached patch and remove the line using the TOKEN_STR macro. Thanks, Paul commit f63739aeac93ae27d89b0d5987a6618195f18daf Author: Paul Iannetta <piannetta@kalrayinc.com> Date: Mon Jul 24 16:01:58 2023 +0200 kvx: bfd: Remove references to kvx_elf64_linux_vec bfd/ChangeLog: 2023-07-24 Paul Iannetta <piannetta@kalrayinc.com> * Makefile.am (BFD64_BACKENDS): Add elf64-kvx.lo. * Makefile.in: Regenerate. * targets.c: Remove references to kvx_elf64_linux_vec. diff --git a/bfd/Makefile.am b/bfd/Makefile.am index 5fc2b822974..464d6dd692f 100644 --- a/bfd/Makefile.am +++ b/bfd/Makefile.am @@ -562,6 +562,7 @@ BFD64_BACKENDS = \ elf64-ia64-vms.lo \ elfxx-ia64.lo \ elfxx-kvx.lo \ + elf64-kvx.lo \ elf32-loongarch.lo \ elf64-loongarch.lo \ elfxx-loongarch.lo \ diff --git a/bfd/Makefile.in b/bfd/Makefile.in index c80fba86a0b..76c7e184dcd 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -1020,6 +1020,7 @@ BFD64_BACKENDS = \ elf64-ia64-vms.lo \ elfxx-ia64.lo \ elfxx-kvx.lo \ + elf64-kvx.lo \ elf32-loongarch.lo \ elf64-loongarch.lo \ elfxx-loongarch.lo \ diff --git a/bfd/targets.c b/bfd/targets.c index b966685c2f0..210beddaf11 100644 --- a/bfd/targets.c +++ b/bfd/targets.c @@ -771,7 +771,6 @@ extern const bfd_target ip2k_elf32_vec; extern const bfd_target iq2000_elf32_vec; extern const bfd_target kvx_elf32_vec; extern const bfd_target kvx_elf64_vec; -extern const bfd_target kvx_elf64_linux_vec; extern const bfd_target lm32_elf32_vec; extern const bfd_target lm32_elf32_fdpic_vec; extern const bfd_target loongarch_elf64_vec; @@ -1135,7 +1134,6 @@ static const bfd_target * const _bfd_target_vector[] = #ifdef BFD64 &kvx_elf64_vec, - &kvx_elf64_linux_vec, #endif &lm32_elf32_vec,
Hi Paul, >> I tried compiling the binutils for a kvx-elf target with your >> patches applied and I ran across a compile time warning/error: > > Yes, indeed, it was more of a convenience macro but it is not well > supported by gcc13+, that's the only location it is used so you can > safely comment out those lines and I will remove them as well. Ok, so with that down, the port compiles. But then there are some unexpected failures in the gas testsuite: FAIL: .set with IFUNC FAIL: elf type list FAIL: elf type-2 list Which are all due to the fact that the kvx port does not support indirect functions: gas/testsuite/gas/elf/ifunc-1.s: Assembler messages: gas/testsuite/gas/elf/ifunc-1.s:9: Error: unrecognized symbol type "gnu_indirect_function" I suggest updating the list of targets-that-do-not-support-ifuncs starting at line 237 of gas/testsuite/gas/elf/elf.exp to fix this. There are similar problems with the binutils testsuite: FAIL: nm --ifunc-chars (assembly) FAIL: weaken STB_GNU_UNIQUE symbols FAIL: strip on STB_GNU_UNIQUE Tweaks to proc supports_gnu_osabi in binutils/testsuite/lib/binutils-common.exp and binutils/testsuite/binutils-all/nm.exp should fix these. Finally there are quite a few failures in the linker testsuite: FAIL: --export-dynamic-symbol foo archive FAIL: -u --export-dynamic-symbol foo archive FAIL: -u --export-dynamic-symbol "f*" archive FAIL: --export-dynamic-symbol-list foo archive FAIL: -u --export-dynamic-symbol-list foo bar archive FAIL: -u --export-dynamic-symbol-list fstar archive FAIL: pr26580-2 FAIL: Build pr22471 FAIL: DT_TEXTREL map file warning FAIL: Build pr22150 FAIL: Build pr25458 FAIL: pr20995 FAIL: --gc-sections with __gxx_personality FAIL: ld-scripts/fill Six of these can be fixed by updating proc check_pie_support in binutils/testsuite/ lib/binutils-common.exp. Interestingly patch 2/7 added a test to this proc, but limited it to the kvx-*-cos target. Which is odd since it appears to be a problem for all kvx targets. Most of the remaining failures appear to be due to this error: error: PHDR segment not covered by LOAD segment Which I am guessing is due to some kind of issue with the built in linker script for the KVX target. Although I am not sure exactly what the issue might be. All of which is to say - please could you submit a v2 patch series with these issues resolved and your other updates integrated, and then I will have another go at reviewing them. Thanks. Cheers Nick
Hi Nick, Thank you for the review. On Tue, Jul 25, 2023 at 03:13:29PM +0100, Nick Clifton wrote: > Hi Paul, > > > > I tried compiling the binutils for a kvx-elf target with your > > > patches applied and I ran across a compile time warning/error: > > > > Yes, indeed, it was more of a convenience macro but it is not well > > supported by gcc13+, that's the only location it is used so you can > > safely comment out those lines and I will remove them as well. > > Ok, so with that down, the port compiles. But then there are some unexpected > failures in the gas testsuite: > > FAIL: .set with IFUNC > FAIL: elf type list > FAIL: elf type-2 list > > Which are all due to the fact that the kvx port does not support indirect > functions: > > gas/testsuite/gas/elf/ifunc-1.s: Assembler messages: > gas/testsuite/gas/elf/ifunc-1.s:9: Error: unrecognized symbol type "gnu_indirect_function" > > I suggest updating the list of targets-that-do-not-support-ifuncs starting > at line 237 of gas/testsuite/gas/elf/elf.exp to fix this. > > There are similar problems with the binutils testsuite: > > FAIL: nm --ifunc-chars (assembly) > FAIL: weaken STB_GNU_UNIQUE symbols > FAIL: strip on STB_GNU_UNIQUE > > Tweaks to proc supports_gnu_osabi in binutils/testsuite/lib/binutils-common.exp > and binutils/testsuite/binutils-all/nm.exp should fix these. > Indeed, we do not support indirect functions for now, I'll fix that. > Finally there are quite a few failures in the linker testsuite: > > FAIL: --export-dynamic-symbol foo archive > FAIL: -u --export-dynamic-symbol foo archive > FAIL: -u --export-dynamic-symbol "f*" archive > FAIL: --export-dynamic-symbol-list foo archive > FAIL: -u --export-dynamic-symbol-list foo bar archive > FAIL: -u --export-dynamic-symbol-list fstar archive > FAIL: pr26580-2 > FAIL: Build pr22471 > FAIL: DT_TEXTREL map file warning > FAIL: Build pr22150 > FAIL: Build pr25458 > FAIL: pr20995 > FAIL: --gc-sections with __gxx_personality > FAIL: ld-scripts/fill > > Six of these can be fixed by updating proc check_pie_support in binutils/testsuite/ > lib/binutils-common.exp. Interestingly patch 2/7 added a test to this proc, but > limited it to the kvx-*-cos target. Which is odd since it appears to be a problem > for all kvx targets. Thanks. > > Most of the remaining failures appear to be due to this error: > > error: PHDR segment not covered by LOAD segment > > Which I am guessing is due to some kind of issue with the built in linker script > for the KVX target. Although I am not sure exactly what the issue might be. > This one is due to the fact that we do not generate a PHDR at all since we only support a very primitive form of dynamic loading (only through calls to dlopen/dlsym), we do not need a PHDR. I'll could add one if needed. We have also been using the `--enable-warn-rwx-segments=no' switch. But I don't think it will be a problem for the testsuite. > > All of which is to say - please could you submit a v2 patch series with these > issues resolved and your other updates integrated, and then I will have another > go at reviewing them. Thanks. > I'll reach back to you as soon as I've fixed everything above. > Cheers > Nick > Thanks, Paul
Hello, On Wed, 26 Jul 2023, Paul Iannetta via Binutils wrote: > > Most of the remaining failures appear to be due to this error: > > > > error: PHDR segment not covered by LOAD segment > > > > Which I am guessing is due to some kind of issue with the built in linker script > > for the KVX target. Although I am not sure exactly what the issue might be. > > > This one is due to the fact that we do not generate a PHDR at all > since we only support a very primitive form of dynamic loading (only > through calls to dlopen/dlsym), we do not need a PHDR. You are using the ELF file format right? In the gABI a program header table is actually non-optional for executables and shared libs. Obviously a psABI can do mostly whatever it likes, but not having PHDRs is _very_ unusual. They aren't specific to dynamic linking: after all, even static executables need to be loaded somewhere, by kernel or boot loader or ROM or $othermagic, and the program headers describe what and where to load. So, you really might want to reconsider. At least one PT_LOAD segment covering the whole file would be good. Ciao, Michael.
Hi Nick, I've taken into account the points you raised in your review, everything should now compile fine when doing ../configure --enable-64-bit-bfd --enable-targets=all and there should be no more unexpected failures both with ../configure --enable-32-bit-bfd --target=kvx-elf and ../configure --enable-64-bit-bfd --target=kvx-elf I've been using gcc (GCC) 13.1.1 20230724 (97d183a8ddb). Please let me know if I am missing something. Thanks, Paul
Hi Michael, On Wed, Jul 26, 2023 at 01:32:56PM +0000, Michael Matz wrote: > Hello, > > On Wed, 26 Jul 2023, Paul Iannetta via Binutils wrote: > > > > Most of the remaining failures appear to be due to this error: > > > > > > error: PHDR segment not covered by LOAD segment > > > > > > Which I am guessing is due to some kind of issue with the built in linker script > > > for the KVX target. Although I am not sure exactly what the issue might be. > > > > > This one is due to the fact that we do not generate a PHDR at all > > since we only support a very primitive form of dynamic loading (only > > through calls to dlopen/dlsym), we do not need a PHDR. > > You are using the ELF file format right? In the gABI a program header > table is actually non-optional for executables and shared libs. > Obviously a psABI can do mostly whatever it likes, but not having PHDRs is > _very_ unusual. They aren't specific to dynamic linking: after all, even > static executables need to be loaded somewhere, by kernel or boot loader > or ROM or $othermagic, and the program headers describe what and where to > load. So, you really might want to reconsider. At least one PT_LOAD > segment covering the whole file would be good. I was not very clear sorry. We have actually have 2 main usages of ELF files: - one for bare-metal programs -- a program is linked with a bare-metal OS into a final standalone free standing executable ELF file which contains an OS, a libc and the userland program. Those bare-metal programs can use a dlopen/dlsym-like API to load ELF blobs which have been deposed in the DDR by some other means. In that case, we don't need a PHDR, even for the ELF blobs which are dynamically loaded, the information in the ELF header are enough since we do not support PIE in this mode and the information in the PHDR is mostly useful for the dynamic loader. - one for linux programs. In that case, all exec/shared libs have a PHDR, and iirc we follow the gABI. When I was writing the previous mail, I had the first case in my head, which is indeed a pretty unusual scenario. Regards, Paul
Hi Paul,
> I've taken into account the points you raised in your review,
Thank you very much.
Just a couple more small issues:
* The kvx-linux target does not appear to be supported by the
assembler. In particular when running the gas testsuite I
found messages like this:
failed with: <Assembler messages:
Fatal error: selected target format 'elf32-kvx' unknown>, no expected output
FAIL: gas/kvx/kv3-1-insns-32
The linker and binutils testsuites also have failures with
similar messages.
I am assuming that "kvx-linux" is a valid configuration target.
If not, then it ought to be rejected by bfd/config.bfd.
* The copyright dates on some of the new files are wrong/old.
For example ld/emultempl/kvxelf.em has:
# Copyright (C) 2009-2016 Free Software Foundation, Inc.
This ought to be "...2009-2023...". I have not checked all the
other files in the patch, but if there any others will out of date
copyright notices then I hope that you will fix them.
Cheers
Nick
Hi Nick, Attached is the patch series revised. On Mon, Jul 31, 2023 at 03:52:31PM +0100, Nick Clifton wrote: > Hi Paul, > > > I've taken into account the points you raised in your review, > > Thank you very much. > > Just a couple more small issues: > > * The kvx-linux target does not appear to be supported by the > assembler. In particular when running the gas testsuite I > found messages like this: > > failed with: <Assembler messages: > Fatal error: selected target format 'elf32-kvx' unknown>, no expected output > FAIL: gas/kvx/kv3-1-insns-32 > > The linker and binutils testsuites also have failures with > similar messages. > > I am assuming that "kvx-linux" is a valid configuration target. > If not, then it ought to be rejected by bfd/config.bfd. > Thanks! Indeed, this is a valid configuration target but only for 64-bit elf and we were trying to run 32 bits tests on them. This point should be fixed now as well as the other failures on kvx-linux. > > * The copyright dates on some of the new files are wrong/old. > For example ld/emultempl/kvxelf.em has: > > # Copyright (C) 2009-2016 Free Software Foundation, Inc. > > This ought to be "...2009-2023...". I have not checked all the > other files in the patch, but if there any others will out of date > copyright notices then I hope that you will fix them. This point is now addressed as well. > > Cheers > Nick > Thanks, Paul
Hi Paul,
> Attached is the patch series revised.
Sorry for the delay in responding - I was away on PTO.
Anyway, the patch series is now in very good shape, so I have
gone ahead and applied it.
Thanks very much for contributing to the binutils.
Cheers
Nick
On 8/16/23 14:24, Nick Clifton via Binutils wrote: > Hi Paul, > >> Attached is the patch series revised. > > Sorry for the delay in responding - I was away on PTO. > > Anyway, the patch series is now in very good shape, so I have > gone ahead and applied it. > > Thanks very much for contributing to the binutils. > > Cheers > Nick > > The builders have caught a few hiccups related to printf modifiers for 32-bit architectures. Could you please take a look at those? A build with --enable-targets=all is recommended to catch those. See https://builder.sourceware.org/buildbot/#/builders/170/builds/3977. -- In file included from ../../binutils-gdb/bfd/elfnn-kvx.c:22: ../../binutils-gdb/bfd/elfxx-kvx-relocs.h:74:3: error: conversion from ‘long long unsigned int’ to ‘unsigned int’ changes value from ‘18446744073709551615’ to ‘4294967295’ [-Werror=overflow] 74 | 0xffffffffffffffff, /* dst_mask */ | ^~~~~~~~~~~~~~~~~~ bfd.h:3204:15: note: in definition of macro ‘HOWTO’ 3204 | src_mask, dst_mask, func, name } | ^~~~~~~~ ../../binutils-gdb/bfd/elfxx-kvx-relocs.h:243:3: error: conversion from ‘long long unsigned int’ to ‘unsigned int’ changes value from ‘18446744073709551615’ to ‘4294967295’ [-Werror=overflow] 243 | 0xffffffffffffffff, /* dst_mask */ | ^~~~~~~~~~~~~~~~~~ bfd.h:3204:15: note: in definition of macro ‘HOWTO’ 3204 | src_mask, dst_mask, func, name } | ^~~~~~~~ ../../binutils-gdb/bfd/elfxx-kvx-relocs.h:399:3: error: conversion from ‘long long unsigned int’ to ‘unsigned int’ changes value from ‘18446744073709551615’ to ‘4294967295’ [-Werror=overflow] 399 | 0xffffffffffffffff, /* dst_mask */ | ^~~~~~~~~~~~~~~~~~ bfd.h:3204:15: note: in definition of macro ‘HOWTO’ 3204 | src_mask, dst_mask, func, name } | ^~~~~~~~ ../../binutils-gdb/bfd/elfxx-kvx-relocs.h:490:3: error: conversion from ‘long long unsigned int’ to ‘unsigned int’ changes value from ‘18446744073709551615’ to ‘4294967295’ [-Werror=overflow] 490 | 0xffffffffffffffff, /* dst_mask */ | ^~~~~~~~~~~~~~~~~~ bfd.h:3204:15: note: in definition of macro ‘HOWTO’ 3204 | src_mask, dst_mask, func, name } | ^~~~~~~~ ../../binutils-gdb/bfd/elfxx-kvx-relocs.h:737:3: error: conversion from ‘long long unsigned int’ to ‘unsigned int’ changes value from ‘18446744073709551615’ to ‘4294967295’ [-Werror=overflow] 737 | 0xffffffffffffffff, /* dst_mask */ | ^~~~~~~~~~~~~~~~~~ bfd.h:3204:15: note: in definition of macro ‘HOWTO’ 3204 | src_mask, dst_mask, func, name } | ^~~~~~~~ ../../binutils-gdb/bfd/elfxx-kvx-relocs.h:750:3: error: conversion from ‘long long unsigned int’ to ‘unsigned int’ changes value from ‘18446744073709551615’ to ‘4294967295’ [-Werror=overflow] 750 | 0xffffffffffffffff, /* dst_mask */ | ^~~~~~~~~~~~~~~~~~ bfd.h:3204:15: note: in definition of macro ‘HOWTO’ 3204 | src_mask, dst_mask, func, name } | ^~~~~~~~ ../../binutils-gdb/bfd/elfxx-kvx-relocs.h:958:3: error: conversion from ‘long long unsigned int’ to ‘unsigned int’ changes value from ‘18446744073709551615’ to ‘4294967295’ [-Werror=overflow] 958 | 0xffffffffffffffff, /* dst_mask */ | ^~~~~~~~~~~~~~~~~~ bfd.h:3204:15: note: in definition of macro ‘HOWTO’ 3204 | src_mask, dst_mask, func, name } | ^~~~~~~~ ../../binutils-gdb/bfd/elfnn-kvx.c: In function ‘elf32_kvx_stub_name’: ../../binutils-gdb/bfd/elfnn-kvx.c:740:28: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘bfd_vma’ {aka ‘const unsigned int’} [-Werror=format=] 740 | snprintf (stub_name, len, "%08x_%s+%" PRIx64 "x", | ^~~~~~~~~~~ ...... 743 | rel->r_addend); | ~~~~~~~~~~~~~ | | | bfd_vma {aka const unsigned int} ../../binutils-gdb/bfd/elfnn-kvx.c:750:28: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 7 has type ‘bfd_vma’ {aka ‘const unsigned int’} [-Werror=format=] 750 | snprintf (stub_name, len, "%08x_%x:%x+%" PRIx64 "x", | ^~~~~~~~~~~~~~ ...... 754 | rel->r_addend); | ~~~~~~~~~~~~~ | | | bfd_vma {aka const unsigned int} cc1: all warnings being treated as errors make[3]: *** [Makefile:1758: elf32-kvx.lo] Error 1 --
Hi Nick, On Wed, Aug 16, 2023 at 02:24:16PM +0100, Nick Clifton wrote: > Hi Paul, > > > Attached is the patch series revised. > > Sorry for the delay in responding - I was away on PTO. > > Anyway, the patch series is now in very good shape, so I have > gone ahead and applied it. > > Thanks very much for contributing to the binutils. Thanks, Paul
On Thu, Aug 17, 2023 at 10:45:09AM +0100, Luis Machado wrote: > > The builders have caught a few hiccups related to printf modifiers for 32-bit architectures. > > Could you please take a look at those? A build with --enable-targets=all is recommended > to catch those. > > See https://builder.sourceware.org/buildbot/#/builders/170/builds/3977. > > -- > > In file included from ../../binutils-gdb/bfd/elfnn-kvx.c:22: > ../../binutils-gdb/bfd/elfxx-kvx-relocs.h:74:3: error: conversion from ‘long long unsigned int’ to ‘unsigned int’ changes value from ‘18446744073709551615’ to ‘4294967295’ [-Werror=overflow] > 74 | 0xffffffffffffffff, /* dst_mask */ > | ^~~~~~~~~~~~~~~~~~ > bfd.h:3204:15: note: in definition of macro ‘HOWTO’ > 3204 | src_mask, dst_mask, func, name } > | ^~~~~~~~ > ../../binutils-gdb/bfd/elfnn-kvx.c: In function ‘elf32_kvx_stub_name’: > ../../binutils-gdb/bfd/elfnn-kvx.c:740:28: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘bfd_vma’ {aka ‘const unsigned int’} [-Werror=format=] > 740 | snprintf (stub_name, len, "%08x_%s+%" PRIx64 "x", > | ^~~~~~~~~~~ > ...... > 743 | rel->r_addend); > | ~~~~~~~~~~~~~ > | | > | bfd_vma {aka const unsigned int} > cc1: all warnings being treated as errors > make[3]: *** [Makefile:1758: elf32-kvx.lo] Error 1 > Hi, I was not able to fully reproduce but the attached patch should fix the build errors. However, we did not do any validation on 32 bits hosts, so I think that even with this patch it will not be enough to pass `mack check'. I'll work on it so that everything pass by the end of the week, so you may want to wait until I have also fixed the validation before applying the patch. Paul commit fdbadf81bf5bdeda0a634ab362de75613011c1c4 Author: Paul Iannetta <piannetta@kalrayinc.com> Date: Thu Aug 17 16:08:29 2023 +0200 kvx: fix warnings when compiling on 32-bits host bfd/ChangeLog: 2023-08-17 Paul Iannetta <piannetta@kalrayinc.com> * elfnn-kvx.c (elfNN_kvx_stub_name): Cast to uint64_t. (elfNN_kvx_relocate_section): Likewise. * elfxx-kvx-relocs.h: Add explicit casts. diff --git a/bfd/elfnn-kvx.c b/bfd/elfnn-kvx.c index 40f9087f3c4..a0a528ef9d2 100644 --- a/bfd/elfnn-kvx.c +++ b/bfd/elfnn-kvx.c @@ -740,7 +740,7 @@ elfNN_kvx_stub_name (const asection *input_section, snprintf (stub_name, len, "%08x_%s+%" PRIx64 "x", (unsigned int) input_section->id, hash->root.root.root.string, - rel->r_addend); + (uint64_t) rel->r_addend); } else { @@ -751,7 +751,7 @@ elfNN_kvx_stub_name (const asection *input_section, (unsigned int) input_section->id, (unsigned int) sym_sec->id, (unsigned int) ELFNN_R_SYM (rel->r_info), - rel->r_addend); + (uint64_t) rel->r_addend); } return stub_name; @@ -2592,7 +2592,7 @@ elfNN_kvx_relocate_section (bfd *output_bfd, /* xgettext:c-format */ : _("%pB(%pA+%#" PRIx64 "): %s used with non-TLS symbol %s")), input_bfd, - input_section, (long) rel->r_offset, howto->name, name); + input_section, (uint64_t) rel->r_offset, howto->name, name); } /* Original aarch64 has relaxation handling for TLS here. */ diff --git a/bfd/elfxx-kvx-relocs.h b/bfd/elfxx-kvx-relocs.h index 7cfd0ff952c..176cf54c63d 100644 --- a/bfd/elfxx-kvx-relocs.h +++ b/bfd/elfxx-kvx-relocs.h @@ -31,8 +31,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_NONE", /* name */ false, /* partial_inplace */ - 0, /* src_mask */ - 0, /* dst_mask */ + (bfd_vma) 0, /* src_mask */ + (bfd_vma) 0, /* dst_mask */ false), /* pcrel_offset */ HOWTO (R_KVX_16, /* type */ 0, /* rightshift */ @@ -44,8 +44,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_16", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_32, /* type */ 0, /* rightshift */ @@ -57,8 +57,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_32", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_64, /* type */ 0, /* rightshift */ @@ -70,8 +70,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_64", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffffffffffffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffffffffffffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S16_PCREL, /* type */ 0, /* rightshift */ @@ -83,8 +83,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S16_PCREL", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffff, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_PCREL17, /* type */ 2, /* rightshift */ @@ -96,8 +96,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_PCREL17", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7fffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7fffc0, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_PCREL27, /* type */ 2, /* rightshift */ @@ -109,8 +109,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_PCREL27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_32_PCREL, /* type */ 0, /* rightshift */ @@ -122,8 +122,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_32_PCREL", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffffffff, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_S37_PCREL_LO10, /* type */ 0, /* rightshift */ @@ -135,8 +135,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_PCREL_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_S37_PCREL_UP27, /* type */ 10, /* rightshift */ @@ -148,8 +148,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_PCREL_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_S43_PCREL_LO10, /* type */ 0, /* rightshift */ @@ -161,8 +161,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_PCREL_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_S43_PCREL_UP27, /* type */ 10, /* rightshift */ @@ -174,8 +174,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_PCREL_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_S43_PCREL_EX6, /* type */ 37, /* rightshift */ @@ -187,8 +187,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_PCREL_EX6", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x3f, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x3f, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_S64_PCREL_LO10, /* type */ 0, /* rightshift */ @@ -200,8 +200,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S64_PCREL_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_S64_PCREL_UP27, /* type */ 10, /* rightshift */ @@ -213,8 +213,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S64_PCREL_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_S64_PCREL_EX27, /* type */ 37, /* rightshift */ @@ -226,8 +226,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S64_PCREL_EX27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_64_PCREL, /* type */ 0, /* rightshift */ @@ -239,8 +239,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_64_PCREL", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffffffffffffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffffffffffffffff, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_S16, /* type */ 0, /* rightshift */ @@ -252,8 +252,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S16", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S32_LO5, /* type */ 0, /* rightshift */ @@ -265,8 +265,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S32_LO5", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7c0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7c0, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S32_UP27, /* type */ 5, /* rightshift */ @@ -278,8 +278,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S32_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S37_LO10, /* type */ 0, /* rightshift */ @@ -291,8 +291,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S37_UP27, /* type */ 10, /* rightshift */ @@ -304,8 +304,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S37_GOTOFF_LO10, /* type */ 0, /* rightshift */ @@ -317,8 +317,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_GOTOFF_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S37_GOTOFF_UP27, /* type */ 10, /* rightshift */ @@ -330,8 +330,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_GOTOFF_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_GOTOFF_LO10, /* type */ 0, /* rightshift */ @@ -343,8 +343,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_GOTOFF_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_GOTOFF_UP27, /* type */ 10, /* rightshift */ @@ -356,8 +356,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_GOTOFF_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_GOTOFF_EX6, /* type */ 37, /* rightshift */ @@ -369,8 +369,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_GOTOFF_EX6", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x3f, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x3f, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_32_GOTOFF, /* type */ 0, /* rightshift */ @@ -382,8 +382,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_32_GOTOFF", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_64_GOTOFF, /* type */ 0, /* rightshift */ @@ -395,8 +395,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_64_GOTOFF", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffffffffffffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffffffffffffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_32_GOT, /* type */ 0, /* rightshift */ @@ -408,8 +408,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_32_GOT", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S37_GOT_LO10, /* type */ 0, /* rightshift */ @@ -421,8 +421,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_GOT_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S37_GOT_UP27, /* type */ 10, /* rightshift */ @@ -434,8 +434,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_GOT_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_GOT_LO10, /* type */ 0, /* rightshift */ @@ -447,8 +447,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_GOT_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_GOT_UP27, /* type */ 10, /* rightshift */ @@ -460,8 +460,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_GOT_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_GOT_EX6, /* type */ 37, /* rightshift */ @@ -473,8 +473,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_GOT_EX6", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x3f, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x3f, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_64_GOT, /* type */ 0, /* rightshift */ @@ -486,8 +486,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_64_GOT", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffffffffffffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffffffffffffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_GLOB_DAT, /* type */ 0, /* rightshift */ @@ -499,8 +499,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_GLOB_DAT", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_COPY, /* type */ 0, /* rightshift */ @@ -512,8 +512,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_COPY", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_JMP_SLOT, /* type */ 0, /* rightshift */ @@ -525,8 +525,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_JMP_SLOT", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_RELATIVE, /* type */ 0, /* rightshift */ @@ -538,8 +538,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_RELATIVE", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_LO10, /* type */ 0, /* rightshift */ @@ -551,8 +551,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_UP27, /* type */ 10, /* rightshift */ @@ -564,8 +564,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_EX6, /* type */ 37, /* rightshift */ @@ -577,8 +577,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_EX6", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x3f, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x3f, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S64_LO10, /* type */ 0, /* rightshift */ @@ -590,8 +590,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S64_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S64_UP27, /* type */ 10, /* rightshift */ @@ -603,8 +603,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S64_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S64_EX27, /* type */ 37, /* rightshift */ @@ -616,8 +616,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S64_EX27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S37_GOTADDR_LO10, /* type */ 0, /* rightshift */ @@ -629,8 +629,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_GOTADDR_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_S37_GOTADDR_UP27, /* type */ 10, /* rightshift */ @@ -642,8 +642,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_GOTADDR_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_S43_GOTADDR_LO10, /* type */ 0, /* rightshift */ @@ -655,8 +655,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_GOTADDR_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_S43_GOTADDR_UP27, /* type */ 10, /* rightshift */ @@ -668,8 +668,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_GOTADDR_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_S43_GOTADDR_EX6, /* type */ 37, /* rightshift */ @@ -681,8 +681,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_GOTADDR_EX6", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x3f, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x3f, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_S64_GOTADDR_LO10, /* type */ 0, /* rightshift */ @@ -694,8 +694,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S64_GOTADDR_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_S64_GOTADDR_UP27, /* type */ 10, /* rightshift */ @@ -707,8 +707,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S64_GOTADDR_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_S64_GOTADDR_EX27, /* type */ 37, /* rightshift */ @@ -720,8 +720,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S64_GOTADDR_EX27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ true), /* pc_offset */ HOWTO (R_KVX_64_DTPMOD, /* type */ 0, /* rightshift */ @@ -733,8 +733,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_64_DTPMOD", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffffffffffffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffffffffffffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_64_DTPOFF, /* type */ 0, /* rightshift */ @@ -746,8 +746,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_64_DTPOFF", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffffffffffffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffffffffffffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S37_TLS_DTPOFF_LO10, /* type */ 0, /* rightshift */ @@ -759,8 +759,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_TLS_DTPOFF_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S37_TLS_DTPOFF_UP27, /* type */ 10, /* rightshift */ @@ -772,8 +772,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_TLS_DTPOFF_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_TLS_DTPOFF_LO10, /* type */ 0, /* rightshift */ @@ -785,8 +785,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_TLS_DTPOFF_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_TLS_DTPOFF_UP27, /* type */ 10, /* rightshift */ @@ -798,8 +798,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_TLS_DTPOFF_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_TLS_DTPOFF_EX6, /* type */ 37, /* rightshift */ @@ -811,8 +811,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_TLS_DTPOFF_EX6", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x3f, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x3f, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S37_TLS_GD_LO10, /* type */ 0, /* rightshift */ @@ -824,8 +824,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_TLS_GD_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S37_TLS_GD_UP27, /* type */ 10, /* rightshift */ @@ -837,8 +837,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_TLS_GD_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_TLS_GD_LO10, /* type */ 0, /* rightshift */ @@ -850,8 +850,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_TLS_GD_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_TLS_GD_UP27, /* type */ 10, /* rightshift */ @@ -863,8 +863,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_TLS_GD_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_TLS_GD_EX6, /* type */ 37, /* rightshift */ @@ -876,8 +876,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_TLS_GD_EX6", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x3f, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x3f, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S37_TLS_LD_LO10, /* type */ 0, /* rightshift */ @@ -889,8 +889,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_TLS_LD_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S37_TLS_LD_UP27, /* type */ 10, /* rightshift */ @@ -902,8 +902,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_TLS_LD_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_TLS_LD_LO10, /* type */ 0, /* rightshift */ @@ -915,8 +915,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_TLS_LD_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_TLS_LD_UP27, /* type */ 10, /* rightshift */ @@ -928,8 +928,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_TLS_LD_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_TLS_LD_EX6, /* type */ 37, /* rightshift */ @@ -941,8 +941,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_TLS_LD_EX6", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x3f, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x3f, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_64_TPOFF, /* type */ 0, /* rightshift */ @@ -954,8 +954,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_64_TPOFF", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffffffffffffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffffffffffffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S37_TLS_IE_LO10, /* type */ 0, /* rightshift */ @@ -967,8 +967,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_TLS_IE_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S37_TLS_IE_UP27, /* type */ 10, /* rightshift */ @@ -980,8 +980,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_TLS_IE_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_TLS_IE_LO10, /* type */ 0, /* rightshift */ @@ -993,8 +993,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_TLS_IE_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_TLS_IE_UP27, /* type */ 10, /* rightshift */ @@ -1006,8 +1006,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_TLS_IE_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_TLS_IE_EX6, /* type */ 37, /* rightshift */ @@ -1019,8 +1019,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_TLS_IE_EX6", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x3f, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x3f, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S37_TLS_LE_LO10, /* type */ 0, /* rightshift */ @@ -1032,8 +1032,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_TLS_LE_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S37_TLS_LE_UP27, /* type */ 10, /* rightshift */ @@ -1045,8 +1045,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S37_TLS_LE_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_TLS_LE_LO10, /* type */ 0, /* rightshift */ @@ -1058,8 +1058,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_TLS_LE_LO10", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xffc0, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xffc0, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_TLS_LE_UP27, /* type */ 10, /* rightshift */ @@ -1071,8 +1071,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_TLS_LE_UP27", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x7ffffff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x7ffffff, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_S43_TLS_LE_EX6, /* type */ 37, /* rightshift */ @@ -1084,8 +1084,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_S43_TLS_LE_EX6", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0x3f, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0x3f, /* dst_mask */ false), /* pc_offset */ HOWTO (R_KVX_8, /* type */ 0, /* rightshift */ @@ -1097,8 +1097,8 @@ static reloc_howto_type elf_kvx_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_KVX_8", /* name */ false, /* partial_inplace */ - 0x0, /* src_mask */ - 0xff, /* dst_mask */ + (bfd_vma) 0x0, /* src_mask */ + (bfd_vma) 0xff, /* dst_mask */ false), /* pc_offset */ };
Hi Paul, On 8/17/23 16:09, Paul Iannetta wrote: > On Thu, Aug 17, 2023 at 10:45:09AM +0100, Luis Machado wrote: >> >> The builders have caught a few hiccups related to printf modifiers for 32-bit architectures. >> >> Could you please take a look at those? A build with --enable-targets=all is recommended >> to catch those. >> >> See https://builder.sourceware.org/buildbot/#/builders/170/builds/3977. >> >> -- >> >> In file included from ../../binutils-gdb/bfd/elfnn-kvx.c:22: >> ../../binutils-gdb/bfd/elfxx-kvx-relocs.h:74:3: error: conversion from ‘long long unsigned int’ to ‘unsigned int’ changes value from ‘18446744073709551615’ to ‘4294967295’ [-Werror=overflow] >> 74 | 0xffffffffffffffff, /* dst_mask */ >> | ^~~~~~~~~~~~~~~~~~ >> bfd.h:3204:15: note: in definition of macro ‘HOWTO’ >> 3204 | src_mask, dst_mask, func, name } >> | ^~~~~~~~ >> ../../binutils-gdb/bfd/elfnn-kvx.c: In function ‘elf32_kvx_stub_name’: >> ../../binutils-gdb/bfd/elfnn-kvx.c:740:28: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘bfd_vma’ {aka ‘const unsigned int’} [-Werror=format=] >> 740 | snprintf (stub_name, len, "%08x_%s+%" PRIx64 "x", >> | ^~~~~~~~~~~ >> ...... >> 743 | rel->r_addend); >> | ~~~~~~~~~~~~~ >> | | >> | bfd_vma {aka const unsigned int} >> cc1: all warnings being treated as errors >> make[3]: *** [Makefile:1758: elf32-kvx.lo] Error 1 >> > > Hi, > > I was not able to fully reproduce but the attached patch should fix > the build errors. However, we did not do any validation on 32 bits > hosts, so I think that even with this patch it will not be enough to > pass `mack check'. I'll work on it so that everything pass by the end > of the week, so you may want to wait until I have also fixed the > validation before applying the patch. Thanks! If 32-bit is supported for kvx, you might want to give the testsuite for that particular mode, just to make sure things are sane. After pushing the changes, you may want to keep an eye out for the following: https://builder.sourceware.org/buildbot/#/builders?tags=binutils https://builder.sourceware.org/buildbot/#/builders?tags=gdb You should see some going back to green. > > Paul > >
On Thu, Aug 17, 2023 at 05:09:53PM +0200, Paul Iannetta via Binutils wrote: > On Thu, Aug 17, 2023 at 10:45:09AM +0100, Luis Machado wrote: > > > > The builders have caught a few hiccups related to printf modifiers for 32-bit architectures. > I was not able to fully reproduce but the attached patch should fix > the build errors. However, we did not do any validation on 32 bits > hosts, so I think that even with this patch it will not be enough to > pass `mack check'. On x86_64-linux, I check a 32-bit host binutils compile using CC="gcc -m32" CXX="g++ -m32" \ CFLAGS="-g -O2" CXXFLAGS="-g -O2" \ ~/src/binutils-gdb/configure --build=i686-linux --enable-targets=all \ --enable-gold --enable-threads --disable-gdb --disable-gdbserver \ --disable-sim --disable-readline --disable-libdecnumber \ --disable-libbacktrace --disable-gprofng --disable-nls Specifying --build may not be necessary nowadays, this is from a very old recipe. > I'll work on it so that everything pass by the end > of the week, so you may want to wait until I have also fixed the > validation before applying the patch. > > Paul > > > @@ -31,8 +31,8 @@ static reloc_howto_type elf_kvx_howto_table[] = > bfd_elf_generic_reloc, /* special_function */ > "R_KVX_NONE", /* name */ > false, /* partial_inplace */ > - 0, /* src_mask */ > - 0, /* dst_mask */ > + (bfd_vma) 0, /* src_mask */ > + (bfd_vma) 0, /* dst_mask */ > false), /* pcrel_offset */ > HOWTO (R_KVX_16, /* type */ > 0, /* rightshift */ Please don't add unnecessary casts like the above.
On Fri, Aug 18, 2023 at 08:50:14AM +0930, Alan Modra wrote: > On Thu, Aug 17, 2023 at 05:09:53PM +0200, Paul Iannetta via Binutils wrote: > > On Thu, Aug 17, 2023 at 10:45:09AM +0100, Luis Machado wrote: > > > > > > The builders have caught a few hiccups related to printf modifiers for 32-bit architectures. > > > I was not able to fully reproduce but the attached patch should fix > > the build errors. However, we did not do any validation on 32 bits > > hosts, so I think that even with this patch it will not be enough to > > pass `make check'. > I've tested it against a 32-bit host in a virtual machine and I think it is enough to pass the build and the validation phase since the `make check' does not seem to actually validate all targets but the host so it should be fine. I still need to improve the validation when the kvx targets are validated on 32 bits hosts but I can do that in a second time. What is the process to get the changes merged? > On x86_64-linux, I check a 32-bit host binutils compile using > CC="gcc -m32" CXX="g++ -m32" \ > CFLAGS="-g -O2" CXXFLAGS="-g -O2" \ > ~/src/binutils-gdb/configure --build=i686-linux --enable-targets=all \ > --enable-gold --enable-threads --disable-gdb --disable-gdbserver \ > --disable-sim --disable-readline --disable-libdecnumber \ > --disable-libbacktrace --disable-gprofng --disable-nls > > Specifying --build may not be necessary nowadays, this is from a very > old recipe. I'll try that thanks, it will be faster than using a virtual machine. > > I'll work on it so that everything pass by the end > > of the week, so you may want to wait until I have also fixed the > > validation before applying the patch. > > > > Paul > > > > > > > @@ -31,8 +31,8 @@ static reloc_howto_type elf_kvx_howto_table[] = > > bfd_elf_generic_reloc, /* special_function */ > > "R_KVX_NONE", /* name */ > > false, /* partial_inplace */ > > - 0, /* src_mask */ > > - 0, /* dst_mask */ > > + (bfd_vma) 0, /* src_mask */ > > + (bfd_vma) 0, /* dst_mask */ > > false), /* pcrel_offset */ > > HOWTO (R_KVX_16, /* type */ > > 0, /* rightshift */ > > Please don't add unnecessary casts like the above. > This is a generated file, that is why the casts are everywhere. I'll get rid of them when unnecessary. Thanks Paul