From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sienna.cherry.relay.mailchannels.net (sienna.cherry.relay.mailchannels.net [23.83.223.165]) by sourceware.org (Postfix) with ESMTPS id 3FEFA386180B for ; Thu, 28 Sep 2023 19:47:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3FEFA386180B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=eagercon.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=eagercon.com X-Sender-Id: dreamhost|x-authsender|eager@eagerm.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 230CEC1787; Thu, 28 Sep 2023 19:47:54 +0000 (UTC) Received: from pdx1-sub0-mail-a259.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 9341EC0CAC; Thu, 28 Sep 2023 19:47:53 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1695930473; a=rsa-sha256; cv=none; b=Dmq5QuBlVOvpX8v+zi4d2zrTBKPAOBemZGBamhqNNI48n93kebEDANcev4377xnlo5dwvd fbJGk98Zg6IuML1prKwRgcVRuvSfh/YwqPF/CivVhgl9SEAm8/Q0AYaPC9lMUkgXDcOorV tvMpjrVM0AX9dpCaINVZTvQ8tVUzEslPKSdiJGmzJCKTAYH6/K56eUXY5q8icbZ+9KvJj/ dnPt3aC2mshowAd03611YI0NHPWNvog/ZnMc0RTnyD4+TFEeMKQdBLW1AzsFq9eoRji9z7 txSRwomVTF2+K/xCVfVhEsRXZQovJ2yRiQxzPQwNKzIunjnz7XWzt+aA2XFNMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1695930473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ECurDuQLqqlRrRQe7M52LTofyrqPMV3caO7D9X6xlgc=; b=GGbsYKjydxdFZLqAKQG7ELGgybb5UV23NAtslMoPFm92koW1y/WS5E2XvT9nVTg8d+6CrR Iz6ty1EPiJo1oKnTUgdVx0iD3Vjwdg+goCoULYfu21CvLHoyDDX5vXuK619knCO1iwUk+Q Vv9Ke07OdN9+Gp2KwerVGaA70XfZ+B6khtbFukoUHxEfr1ceWY4wCptLkSeRbV+0TDRnrH p/tMfVhQH9Ikeq7VmOUr9Kuuem1KP4XJJPd6Ys90hFe9rRcLi3E5uSlQU6BhjUTnBYzVP1 u+gNvQ36EfWWsJzBx4XI18cUTFSjbGihWjMabrOqnWqiZJqWIQ/IYsgq3lIejQ== ARC-Authentication-Results: i=1; rspamd-7d5dc8fd68-sdn6s; auth=pass smtp.auth=dreamhost smtp.mailfrom=eager@eagercon.com X-Sender-Id: dreamhost|x-authsender|eager@eagerm.com X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|eager@eagerm.com X-MailChannels-Auth-Id: dreamhost X-Cooperative-Wide-Eyed: 68d2e8db50a17533_1695930473942_1710117440 X-MC-Loop-Signature: 1695930473942:2212016775 X-MC-Ingress-Time: 1695930473942 Received: from pdx1-sub0-mail-a259.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.106.112.200 (trex/6.9.1); Thu, 28 Sep 2023 19:47:53 +0000 Received: from [192.168.20.10] (c-73-170-238-207.hsd1.ca.comcast.net [73.170.238.207]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) (Authenticated sender: eager@eagerm.com) by pdx1-sub0-mail-a259.dreamhost.com (Postfix) with ESMTPSA id 4RxPCY0Sd1zL8; Thu, 28 Sep 2023 12:47:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eagercon.com; s=dreamhost; t=1695930473; bh=ECurDuQLqqlRrRQe7M52LTofyrqPMV3caO7D9X6xlgc=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=gBMVv5dJN3jh6hTQfdrXE6erx/FCzDSMWMMSy3kXeBdMZNIrFJ6U4WUpPO+ewfz5D UrdtLNJZ49OlOgvKgdydko/fPZ0Q2Rqw4ePf7Y6yaafVQq3eDiRxKpZl5ok3EOOP4e FfBfTo/yYs+puWGTYSzICVZg3QtiwpThac2Xj5r1eT97JA8EFy3QRLRI2MN6x/TRYS WLDfezNb6Y1skUdWgQjUUlyuECvLyM1g3dM4wtROdTHncsonuNLwGtaCqcHiYWOvK/ FMH2WoVNiroQeUg9dDUq/o3/EQkJarCC+AZGe49S7lS1bmGK6dMQ/J0cR742gVUze4 /+Ubo4wMR3AyA== Message-ID: <543a14cd-38c9-3f3a-5047-c7b78efecbc0@eagercon.com> Date: Thu, 28 Sep 2023 12:47:52 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v1 1/1] ld: microblaze: Add error detail for mxl-gp-opt flag Content-Language: en-US To: Neal Frager , binutils@sourceware.org Cc: ibai.erkiaga-elorza@amd.com, nagaraju.mekala@amd.com, mark.hatle@amd.com, sadanand.mutyala@amd.com, appa.rao.nali@amd.com, vidhumouli.hunsigida@amd.com, luca.ceresoli@bootlin.com References: <20230927134821.1621734-1-neal.frager@amd.com> From: Michael Eager In-Reply-To: <20230927134821.1621734-1-neal.frager@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 9/27/23 06:48, Neal Frager via Binutils wrote: > Compiler will give error messages in more detail > for microblaze mxl-gp-opt flag. > > This patch has been tested for years of AMD Xilinx Yocto > releases as part of the following patch set: > > https://github.com/Xilinx/meta-xilinx/tree/master/meta-microblaze/recipes-devtools/binutils/binutils > > Signed-off-by: Neal Frager > --- > ld/ldmain.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/ld/ldmain.c b/ld/ldmain.c > index 06ac2c64fa8..aca3d84ccf1 100644 > --- a/ld/ldmain.c > +++ b/ld/ldmain.c > @@ -1575,6 +1575,16 @@ reloc_overflow (struct bfd_link_info *info, > break; > case bfd_link_hash_defined: > case bfd_link_hash_defweak: > + if((strcmp(reloc_name,"R_MICROBLAZE_SRW32") == 0) && entry->type == bfd_link_hash_defined) > + { > + einfo (_(" relocation truncated to fit: don't enable small data pointer optimizations[mxl-gp-opt] if extern or multiple declarations used: " > + "%s against symbol `%T' defined in %A section in %B"), > + reloc_name, entry->root.string, > + entry->u.def.section, > + entry->u.def.section == bfd_abs_section_ptr > + ? info->output_bfd : entry->u.def.section->owner); > + break; > + } > einfo (_(" relocation truncated to fit: " > "%s against symbol `%pT' defined in %pA section in %pB"), > reloc_name, entry->root.string, Hi Neal -- It would be better if the patch were moved after the bfd_link_hash_defined case and the (then redundant) test for entry->type removed. Add a /* FALL THROUGH */ notation. ldmain.c is generic code. There are no tests for any other architecture. I'm reluctant to add target-dependent tests in generic code. Perhaps one of the linker maintainers can comment on this. If this additional diagnostic information is useful for MicroBlaze, perhaps it would be useful for all other architectures (without the MB-specific option, of course). -- Michael Eager