Message ID | 20230927124918.1584074-1-neal.frager@amd.com |
---|---|
State | Accepted, archived |
Headers |
Return-Path: <binutils-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2FAAE3861820 for <patchwork@sourceware.org>; Wed, 27 Sep 2023 12:50:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2FAAE3861820 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1695819002; bh=vuNwNee1YuU0yWPwjJ9TakVzChNkdLf9r4yPXkxxDxQ=; h=To:CC:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=ohkOZUCRDx00MMTSmfP2GL4TTFuhp34VtMbEIjHihACfgMhiQSoUhb1azqFn1+U9p L0qpZz0qAnYO4fzD8dUgGctqcClAxOAWIDhZod8u9cAplAmdCO41sfF0oXRopoIF77 ynuP7Tb+gN6K73hKenTx1boFgke6vkYcvstHVb8E= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2047.outbound.protection.outlook.com [40.107.223.47]) by sourceware.org (Postfix) with ESMTPS id 5969C3858D33 for <binutils@sourceware.org>; Wed, 27 Sep 2023 12:49:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5969C3858D33 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ITfg/GKCITYv7UKR3dCtalN5fvOv0aTOduFBCYLLPn7CZAnYZWlRAYJmlG3qrv0SHOOACbLIEnQYVM+rhYBs0a+s19OcYxb2Ub715LX1toqX7OywXparxBW1uEMjkGmQ+RkT0Xg/ecllN3mgV4OhaMwSCokb/l3lx2GbhzRtAqjD3HbNPPky46kG5y+BPh+UVET1utED4zkEkSWkJv1or7di+Er+o7LYRp1bzXLznnwvXJZgyB9qmWigcomWQpL+qAZHrkebFugj2pZefM0LR1vHvWA1awsqbywoMScmyHUsaghshHd8tlMCeRwYk1ICQ5rxykLtwwi1j2sIrPxfyg== 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=vuNwNee1YuU0yWPwjJ9TakVzChNkdLf9r4yPXkxxDxQ=; b=aua3BsHQ6SPz92dncWdFig9oyGrWyeH/DIFVI0iAb8hter/b8EmqrFKZNXQyr2Cm+Xj2RdQ/DWNu0bczrOGsUWcEXulK+ML37S7XdbsVsKLQ4tmozrO6mYWE1HopYTRPKqI3A4zU+46mU58NBDVMgW4YdZBh3xeyDIbbp+SZzAQ3OIfJhbkxLzlsGwS92tBs9cOQ6aFr54D3738ryZLeVlHDPgk0CfXg4B3t4xEmEk25tfnfSiK8GwVF52Rtm/VV8oxmf7nwsKgvW7MJDs561Zv8DyyHpd1WlBpldmNCXjLr8sUURcSvIl5KaXUQw0nJkT0pTLvKCKo7nmHgqJY+ug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=sourceware.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none Received: from SA1P222CA0118.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:3c5::6) by CY5PR12MB6324.namprd12.prod.outlook.com (2603:10b6:930:f::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.31; Wed, 27 Sep 2023 12:49:27 +0000 Received: from SA2PEPF00001508.namprd04.prod.outlook.com (2603:10b6:806:3c5:cafe::e2) by SA1P222CA0118.outlook.office365.com (2603:10b6:806:3c5::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.22 via Frontend Transport; Wed, 27 Sep 2023 12:49:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by SA2PEPF00001508.mail.protection.outlook.com (10.167.242.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.14 via Frontend Transport; Wed, 27 Sep 2023 12:49:27 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 27 Sep 2023 07:49:27 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 27 Sep 2023 07:49:26 -0500 Received: from xirengwts09.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Wed, 27 Sep 2023 07:49:25 -0500 To: <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>, Neal Frager <neal.frager@amd.com> Subject: [PATCH v1 1/1] bfd: microblaze: Fix bug in TLSTPREL Relocation Date: Wed, 27 Sep 2023 13:49:18 +0100 Message-ID: <20230927124918.1584074-1-neal.frager@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00001508:EE_|CY5PR12MB6324:EE_ X-MS-Office365-Filtering-Correlation-Id: a39f204e-226c-400f-995e-08dbbf582f74 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7bLgLDKFxODjjzWFYO7/zCCzZNQjM3nwQBppupUv0kRTy71HK7CZ1bwoCwRuxPB0To8pwxH59em38CnrpXK2GZ31veC+iueC8UDV7isRPfRcl1SvhuhpcY8jbYXECn/IvP7QJ7+qWlxgFGDfHB3giHZv1P0DK3R2mMkuP6PB0QcUx+9aEt2euj0AHV/EWuDlv/znBc7TYT8arP4hqmEfnz/VKl2GZA0NUHs0Vf4h+x9PQ3AhVrHAqnzkfhzLEayE+d7SUmqYCHVfvCqMxYSwTvvOlcmch5zkAZQgyGRH6a4AP92JHYXoZRyWKXL2/6KP7U292yGYI1PmbxLZqYbwqVVFIzbK6Fuq2rhVf+aYM0dfc7cDJyNQJrt6qnBrhivsrk0WEztqIWVp2wAqSCM9DGkd7U2zUNw3W31ngfAbPOSKyo7FAPmP5FcQ/VqW45pwuAbHjpuOG66Fk2MfphxD/IUY73mvtN2NVyPFY4VNJ09Sl2RlIjODJN1u36YNQidCk8i4qcZYgqOsOcj8utp7GhxjMNxHo4uP9K0vLuenWVG1awXhJI676W6StMXrScqQRd8MAcD508Y7fovwf/jy7epfEYBFvBYnc0WIFCMnHyjOgM2dSvgQt87shMQUxKpvKcHk32xEQXiyj7yQLNXtNCOE+n4YX2tEoayR9ZMUcVn3fk8HPjjxxTGWC5awrUYVBYo5wsYY3CS4c0VL88fd+JJ8KUPcCdyQI2pUeo6NS1Nq6u8yoCMB/JzdoMOptWVy X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB03.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(376002)(396003)(39860400002)(136003)(346002)(230922051799003)(451199024)(186009)(1800799009)(82310400011)(46966006)(36840700001)(40470700004)(86362001)(2616005)(6666004)(40460700003)(40480700001)(316002)(478600001)(2906002)(70586007)(6916009)(36860700001)(36756003)(966005)(47076005)(356005)(83380400001)(26005)(426003)(336012)(1076003)(54906003)(70206006)(82740400003)(81166007)(41300700001)(44832011)(8936002)(8676002)(4326008)(5660300002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2023 12:49:27.6630 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a39f204e-226c-400f-995e-08dbbf582f74 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF00001508.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6324 X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, 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 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 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: Neal Frager via Binutils <binutils@sourceware.org> Reply-To: Neal Frager <neal.frager@amd.com> Errors-To: binutils-bounces+patchwork=sourceware.org@sourceware.org Sender: "Binutils" <binutils-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
[v1,1/1] bfd: microblaze: Fix bug in TLSTPREL Relocation
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 | success | Testing passed |
linaro-tcwg-bot/tcwg_binutils_check--master-arm | success | Testing passed |
linaro-tcwg-bot/tcwg_binutils_build--master-arm | success | Testing passed |
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 | success | Testing passed |
Commit Message
Neal Frager
Sept. 27, 2023, 12:49 p.m. UTC
Fixed the problem related to the fixup/relocations TLSTPREL. When the fixup is applied the addend is not added at the correct offset of the instruction. The offset is hard coded considering its big endian and it fails for Little endian. This patch allows support for both big & little-endian compilers. 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: nagaraju <nagaraju.mekala@amd.com> Signed-off-by: Neal Frager <neal.frager@amd.com> --- bfd/elf32-microblaze.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Comments
Hi Neal, > Fixed the problem related to the fixup/relocations TLSTPREL. > When the fixup is applied the addend is not added at the correct offset > of the instruction. The offset is hard coded considering its big endian > and it fails for Little endian. This patch allows support for both > big & little-endian compilers. > > 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: nagaraju <nagaraju.mekala@amd.com> > Signed-off-by: Neal Frager <neal.frager@amd.com> > --- > bfd/elf32-microblaze.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Patch approved, please apply. Cheers Nick
On 9/27/23 08:24, Nick Clifton via Binutils wrote: > Hi Neal, > >> Fixed the problem related to the fixup/relocations TLSTPREL. >> When the fixup is applied the addend is not added at the correct offset >> of the instruction. The offset is hard coded considering its big endian >> and it fails for Little endian. This patch allows support for both >> big & little-endian compilers. >> >> 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: nagaraju <nagaraju.mekala@amd.com> >> Signed-off-by: Neal Frager <neal.frager@amd.com> >> --- >> bfd/elf32-microblaze.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) > > Patch approved, please apply. > > Cheers > Nick Committed.
diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c index bbc70fdf4e3..a7e81c70fc8 100644 --- a/bfd/elf32-microblaze.c +++ b/bfd/elf32-microblaze.c @@ -1467,9 +1467,9 @@ microblaze_elf_relocate_section (bfd *output_bfd, relocation += addend; relocation -= dtprel_base(info); bfd_put_16 (input_bfd, (relocation >> 16) & 0xffff, - contents + offset + 2); + contents + offset + endian); bfd_put_16 (input_bfd, relocation & 0xffff, - contents + offset + 2 + INST_WORD_SIZE); + contents + offset + endian + INST_WORD_SIZE); break; case (int) R_MICROBLAZE_TEXTREL_64: case (int) R_MICROBLAZE_TEXTREL_32_LO: