From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from 10.mo576.mail-out.ovh.net (10.mo576.mail-out.ovh.net [46.105.73.241]) by sourceware.org (Postfix) with ESMTPS id 3C2323858D32 for ; Mon, 11 Dec 2023 07:51:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3C2323858D32 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=microej.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=microej.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3C2323858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=46.105.73.241 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702281121; cv=none; b=fKcFOmoYR3wZn8DjsrIarGrX8xdjpWNP8fV43FWGvXnaI7vp7MU3Vn8l2pOkmHMGNJi8u5sKcpLl1ZmPCwwgCUj1x4SbGcJ8BuskeSLSBQLGiXLcz0KScUhyl25z7PWmq4xMh52OQa/jWDmrHPTkgsdQUSosmjFGKrB/3W4qQ30= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702281121; c=relaxed/simple; bh=DPA1Uim0m5/OB4rcyzhCjmoptnFPyF5LpuCuEnvhPjg=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=UssKttqF2YvOEeQS75Fft0QNWi5nHanyPWNbfFos25Let4KGvcKc99rLtQD+jph+h5tIC+88GN5zwnGnp6n8RtKUCYL6kUZ+jrH9AuAP00vSKPKY2DaipvEm1t8xEn52EDBlsNy12MObU7FNRS33h7dyq0vHf5teGT4yX1ZuRfA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from director1.ghost.mail-out.ovh.net (unknown [10.108.1.146]) by mo576.mail-out.ovh.net (Postfix) with ESMTP id C8CB424CA8 for ; Mon, 11 Dec 2023 07:51:57 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-fnlct (unknown [10.110.115.73]) by director1.ghost.mail-out.ovh.net (Postfix) with ESMTPS id D70E51FEA3; Mon, 11 Dec 2023 07:51:56 +0000 (UTC) Received: from microej.com ([37.59.142.109]) by ghost-submission-6684bf9d7b-fnlct with ESMTPSA id 0zwlMJy/dmV55gsAXr24tA (envelope-from ); Mon, 11 Dec 2023 07:51:56 +0000 Authentication-Results:garm.ovh; auth=pass (GARM-109S0037b32c16a-c7ee-4e57-85aa-4f7a75f13b22, F58B57DB7296A9094D051254052A784E11B55B33) smtp.auth=frederic.riviere@microej.com X-OVh-ClientIp:92.154.86.223 Message-ID: <56093691-58df-4917-99e7-41a47e5e1e5d@microej.com> Date: Mon, 11 Dec 2023 08:51:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: load of in-place relocation addend in AArch64 Content-Language: en-US To: Nick Clifton Cc: binutils@sourceware.org References: <2747d24e-1331-4970-8660-421f4479dc62@redhat.com> <54acf602-44ed-4bc8-8652-5feb450195ee@microej.com> <5c111888-0f10-46fd-9f5a-43354f2eda8a@redhat.com> <1aa735f4-ff2d-4334-830e-d23ef154dbba@microej.com> <578e6c40-5e6c-448f-bb76-791ad19db444@redhat.com> From: =?UTF-8?B?RnLDqWTDqXJpYyBSaXZpw6hyZQ==?= Autocrypt: addr=frederic.riviere@microej.com; keydata= xsFNBFuDri0BEADAe942XdjQtiUKT0359QcDfvgXnoeHeIZDBoqPKQhBoX4oPW2FvlZ0iz6V vVD/EzQI4QCMWixEHmMaGKSKHwV9k5UVC55l9UNLO0biDuXUeZ4u4AtW4bV0kVoILdk2dR/o brd6zi71vrUlvmM+m9RSHzMaZocbnOpgI1zRP0Wf4Zwb/srG8jvrGD++rFvUtzphJUzjfSM+ 1FDRK9PS4W6wTdQobfIEffQKnHpT2ZrgR1gX0fHmWkaecMXn6cJv8BX5nPyGSgXYl/dwT93U 9KOtPWmEWShTKVoUbS6VwZKdKmflvuwkALY1ogSxzHteLIEt/IJFP4YY1JopEC4IK8tuv5wK QsReJI89vKlP2JZIv9h20jkzaVgZ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4fg0oe2l9ZlDBHytXg69f7kpJPqAPMej9brC4yUauosA+Kc7DyRDIqWKO3fcdu/n93T 9dG5cSqt0zC1ea+SByrhxSfVFf5e0ziHNv8P+q/B5fU0OmwA8+0HdJvoecWelK5K9mCCz2gE xUnaln46iIcySn3f2UxRKvLNihJPAnjgilV8t/FNMtxUB0815ZuAPkm7l5/NbebyDuckqjt2 lp5z4Z3+s1ZH5fuD4uz1wC4jC79Uwr0EiN1FNUoPmpALaLjSdFn8AZ1NGYxGxdfU9gvKT6// o7/X8uoBE23fhG/tBgPcg6Kztml7Qx7Ox9MqKtvMJir8zdscb6LLaOzflmOk+ov8D5paiLoo pv57ay7oHet8kssho7V/oCV2JteKt5+W3WguQUZIpRr+dSjeQUoFZK570ZHS0DgKZoZDjK+j 2Ph3q2GwWnQFxgBEaEloR9R1r3qT33o= In-Reply-To: <578e6c40-5e6c-448f-bb76-791ad19db444@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 13807192034405457684 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrudeluddguddufecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomhephfhrrogurohrihgtucftihhvihoqrhgvuceofhhrvgguvghrihgtrdhrihhvihgvrhgvsehmihgtrhhovghjrdgtohhmqeenucggtffrrghtthgvrhhnpeevffffvdfhjefhuefhhfefveevjeduiedtueduuedujedvgfelfeelleegffelhfenucffohhmrghinhepmhhitghrohgvjhdrtghomhdplhhinhhkvgguihhnrdgtohhmpdhtfihithhtvghrrdgtohhmpdihohhuthhusggvrdgtohhmnecukfhppeduvdejrddtrddtrddupdelvddrudehgedrkeeirddvvdefpdefjedrheelrddugedvrddutdelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeofhhrvgguvghrihgtrdhrihhvihgvrhgvsehmihgtrhhovghjrdgtohhmqedpnhgspghrtghpthhtohepuddprhgtphhtthhopegsihhnuhhtihhlshesshhouhhrtggvfigrrhgvrdhorhhgpdfovfetjfhoshhtpehmohehjeeipdhmohguvgepshhmthhpohhuth X-Spam-Status: No, score=3.8 required=5.0 tests=BAYES_50,BODY_8BITS,KAM_DMARC_STATUS,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: *** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Nick, I understand the reason and I agree with a warning, because in the meantime I realized that REL relocations are correctly supported when there is no in-place addend. So we could improve the message as following: "Warning: REL type relocations are not expected for architecture 'aarch64' - in-place addends with non-zero values are not supported." Also I believe it would be perfect if this message could be printed only during the relocation process, to avoid impacting the other tools. I'm not familiar with LD code base but is there any chance to be able to retrieve the original relocation kind when we are in the "elfNN_aarch64_relocate_section" function ? (for example by being able to retrieve the original relocation section type or the relocation entry size for example) Best Regards, --Frédéric On 12/7/2023 6:16 PM, Nick Clifton wrote: > Hi Frédéric, > >   OK, I have produced a small patch (attached) which adds this warning >   message to the linker's output: > >     $ ld test_AArch64_with_REL.o >     ld: test_AArch64_with_REL.o: Warning: REL type relocations are not > expected for architecture 'aarch64' - support may be incomplete > >   This warning does not actually stop the link from completing however. >   The reason for this is that the code where the relocations are loaded >   is shared by other tools, which do still work with REL relocations. >   For example the objdump tool is able to display the relocations without >   any problems: > >     $ objdump -r test_AArch64_with_REL.o >     BFD: test_AArch64_with_REL.o: Warning: REL type relocations are > not expected for architecture 'aarch64' - support may be incomplete > >     test_AArch64_with_REL.o:     file format elf64-littleaarch64 > >     RELOCATION RECORDS FOR > [.text.__icetea__virtual__com_is2t_icetea_support_test_BImpl___bar__I]: >     OFFSET           TYPE              VALUE >     0000000000000008 R_AARCH64_ABS32 > com_is2t_icetea_support_test_AImpl___bar >     [...] > >   This strikes me as a compromise solution at best, but it is better >   than the current situation nonetheless. > >   What do you think ? > > Cheers >   Nick > > > -- MicroEJ Frédéric RIVIERE /CTO Office Member & VP Product/ 11 rue du Chemin Rouge - Bat. D 44373 Nantes Cedex 3, France https://www.linkedin.com/in/fredericriviere/ Twitter LinkedIn Youtube event This email (and all attachments) may contain information that is proprietary privileged, and/or confidential. If you received this e-mail in error or if it was improperly forwarded to you, the information contained in the e-mail should, at all times, remain confidential. Please notify the sender immediately by e-mail, and delete or destroy the original and any copies. Any unauthorized use, disclosure, reproduction, retention or distribution by any person other than the intended recipient is strictly prohibited.